﻿/* GLOBAL DEFAULTS */
form#form1 {
    height: 100%;
    display: flex;
    flex-direction: column;
}

body, html {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    height: 100%;
    box-sizing: border-box;
}

* {
    box-sizing: border-box;
}
/*LOGIN PAGE STYLES*/
.full-width {
    min-height: 100vh;
    width: 100%;
    background-color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px; /* Prevents edge touching on mobile */
}

.form-container {
    background-color: #1a1a1a; /* Dark Grey */
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.1); /* Slight white glow or keep dark shadow */
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px; /* Space between elements */
}

.logo-main {
    max-width: 100%;
    height: auto;
    width: 300px; /* Reasonable default size */
    margin-bottom: 10px;
}

.logo-text {
    max-width: 100%;
    height: auto;
    width: 300px;
    margin-top: 20px;
}

/* The "Line - Text - Line" separator */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    width: 100%;
    color: lightgray;
    font-size: 0.9rem;
}

    .separator::before,
    .separator::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid lightgray;
    }

    .separator span {
        padding: 0 10px;
    }

/* Inputs */
.input-group {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.input-field {
    width: 100%;
    height: 45px;
    padding: 0 15px;
    border-radius: 5px;
    border: 1px solid lightgray;
    outline: none;
    transition: all 0.3s ease;
    font-size: 1rem;
}

    .input-field:focus {
        border-color: mediumpurple;
        box-shadow: 0 0 8px rgba(147, 112, 219, 0.5);
    }

.button {
    text-decoration: none;
    background-color: mediumpurple;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px;
    font-weight: bold;
    cursor: pointer;
    width: 100%; /* Full width button is better for UX */
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
    display: inline-block;
    text-align: center;
}

    .button:hover {
        background-color: darkorange;
        transform: translateY(-2px);
    }

    .button.ok {
        width: 80px;
    }
/* Errors */
.error-container {
    min-height: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: red;
}

/* Specific link style for the dark login background */
.login-footer-link {
    text-decoration: none;
    color: White;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

    .login-footer-link:hover {
        color: mediumpurple;
    }

/* --- MASTERPAGE LAYOUT (New) --- */

/* The main wrapper that holds Header + Body */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Forces full viewport height */
    height: auto;
    background-color: #f4f6f9; /* Light grey background for content */
}

/* 1. HEADER SECTION */
.header-row {
    background-color: white;
    height: 80px; /* Fixed height header */
    display: flex;
    justify-content: space-between; /* Pushes Logo left, Nav right */
    align-items: center; /* Vertically centers items */
    padding: 0 30px;
    border-bottom: 3px solid black; /* The "Line" requested */
    flex-shrink: 0; /* Prevents header from shrinking */
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.logo-section img {
    height: 60px;
    width: auto;
    display: block;
}

.nav-section {
    font-size: 1rem;
    color: #333;
    font-weight: 600;
}

.nav-link {
    text-decoration: none;
    color: #555;
    transition: color 0.2s;
}

    .nav-link:hover {
        color: mediumpurple;
    }

/* 2. MAIN BODY (Sidebar + Content) */
.main-body {
    display: flex; /* Puts Sidebar next to Content */
    flex-direction: row; /* FORCE SIDE BY SIDE */
    flex: 1; /* Takes up all remaining vertical space */
    overflow: auto;
}

/* 3. SIDEBAR */
.sidebar {
    width: 260px; /* Fixed width */
    min-width: 260px;
    background-color: #1a1a1a; /* Dark Grey */
    color: white;
    display: flex;
    flex-direction: column;
    padding: 20px;
    overflow-y: auto; /* Scrolls internally if menu is long */
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* Sidebar Links */
.menu-link {
    text-decoration: none;
    color: white;
    padding: 12px 15px;
    margin-bottom: 5px;
    border-radius: 5px;
    display: block;
    transition: all 0.3s;
    font-size: 1rem;
    font-weight: bold;
}

    .menu-link:hover, .menu-link.active {
        background-color: mediumpurple;
        color: white;
        font-weight: bold;
        transform: translateX(5px); /* Subtle slide effect */
    }

/* Sidebar Footer (Sign out at bottom) */
.sidebar-footer {
    margin-top: auto; /* Pushes this to the bottom */
    padding-top: 20px;
    border-top: 1px solid mediumpurple;
}

.menu-link.logout {
    color: mediumpurple;
    text-align: center;
}

    .menu-link.logout:hover {
        background-color: white;
        color: mediumpurple;
        transform: translateX(5px); /* Subtle slide effect */
    }

/* Active State (Optional, requires code-behind logic to set class) */
.menu-link-lo.active {
    background-color: white;
    color: mediumpurple;
    font-weight: bold;
}
/* 4. CONTENT AREA */
.content-area {
    flex: 1; /* Takes remaining width */
    padding: 30px;
    overflow-y: auto; /* Content scrolls independently of sidebar */
    background-color: #f4f6f9;
}

/* Responsive: Collapse sidebar on small screens (Optional) */
@media (max-width: 768px) {
    .main-body {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 10px;
        overflow-y: visible;
    }

    .header-row {
        padding: 0 15px;
    }
}

/* ... Keep your existing CSS (Global, Login, Layout, Sidebar) ... */

/* --- DASHBOARD STYLES (New) --- */

.container {
    max-width: 1800px;
    margin: 0 auto;
    width: 100%;
}

/* responsive grid: 3 columns on desktop, 1 on mobile */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* The white cards holding content */
.dashboard-card {
    background-color: white;
    border: 1px solid mediumpurple;
    border-radius: 8px;
    padding: 20px;
    height: 100%; /* Ensures all cards in a row are same height */
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

    .dashboard-card h2 {
        margin-top: 0;
        color: #333;
        border-bottom: 2px solid #f4f6f9;
        padding-bottom: 10px;
        margin-bottom: 15px;
        font-size: 1.2rem;
    }

/* Inner Stats Grid (2x2 for Enrolled/NotStarted etc) */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: center;
}

.stat-item {
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 5px;
    transition: transform 0.2s;
}

    .stat-item:hover {
        transform: translateY(-2px);
        background-color: #f0f0f0;
    }

/* Links inside stats */
.stat-link {
    display: block;
    color: mediumpurple;
    font-size: 1.2rem; /* approx 20px */
    font-weight: bold;
    text-decoration: none;
    margin-bottom: 5px;
}

.stat-number {
    font-size: 2rem; /* approx 32px */
    font-weight: bold;
    color: #333;
}

/* Quick Access Buttons */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}

.quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: white;
    border: 1px solid mediumpurple;
    color: mediumpurple;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s;
    text-decoration: none;
    height: 100%;
}

    .quick-btn:hover {
        background-color: mediumpurple;
        color: white;
    }

/* Table overrides for GridView to look modern */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
}

    .dashboard-table th {
        background-color: mediumpurple;
        color: white;
        padding: 8px;
        text-align: left;
    }

    .dashboard-table td {
        padding: 8px;
        border-bottom: 1px solid #eee;
    }

/* Chart Container */
.chart-container {
    width: 100%;
    overflow-x: auto; /* Scroll if chart is too wide on mobile */
    display: flex;
    justify-content: center;
}

/* --- FILTER SECTION STYLES (Add to your CSS) --- */

/* Replaces the <table> layout */
.filter-container {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid lightgray;
    margin-bottom: 20px;
    display: grid;
    /* Responsive: 1 column on mobile, 4 columns on desktop */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end; /* Aligns button with inputs */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

/* Specific override for the filter button so it doesn't take full width in the grid */
.button.btn-filter {
    width: 100%;
    margin-bottom: 0;
}

/* Modernize the GridView */
.modern-grid {
    width: 100%;
    border-collapse: collapse;
    background-color: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-radius: 8px; /* Rounded corners */
    overflow: hidden; /* Clip corners */
}

    .modern-grid th {
        background-color: mediumpurple;
        color: white;
        padding: 12px 15px;
        text-align: left;
        font-weight: bold;
    }

    .modern-grid td {
        padding: 10px 15px;
        border-bottom: 1px solid #eee;
        color: #333;
    }

    .modern-grid tr:hover {
        background-color: #f9f9f9;
    }

    /* Pager styling fix */
    .modern-grid table {
        margin: 0 auto; /* Centers the numeric pager */
    }

/* Alert Box for Errors */
.alert-box {
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
    background-color: #ffe6e6; /* Light red bg */
    border: 1px solid red;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Status Toggle Container */
.status-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
    padding: 5px 0;
}

    /* Image Button Styling */
    .status-toggle input[type="image"] {
        height: 32px; /* Sets a fixed height for consistency */
        width: auto; /* Maintains aspect ratio */
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        /*border-radius: 50%;  Optional: Makes the hover glow round if images are round */
    }

        /* Hover Effect */
        .status-toggle input[type="image"]:hover {
            transform: scale(1.1); /* Slight zoom effect */
            filter: brightness(1.1); /* Slightly brightens the image */
            box-shadow: 0 0 8px rgba(147, 112, 219, 0.4); /* MediumPurple glow */
        }

/*LISTS*/
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    padding: 10px;
    background: white;
    border-bottom: 1px solid mediumpurple;
}

.tab-btn {
    padding: 10px 20px;
    text-decoration: none;
    color: mediumpurple;
    border: 1px solid mediumpurple;
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s;
}

    .tab-btn:hover {
        background-color: mediumpurple;
        color: white;
    }
/* Aligns the action buttons (add/save) with the input field at the bottom */
.action-group {
    display: flex;
    align-items: flex-end;
    padding-bottom: 5px;
    gap: 10px;
}

.asImgbtn {
    width: 30px;
    height: 30px;
    cursor: pointer; /* Shows a hand cursor on hover */
    transition: all 0.2s; /* Smooth animation for hover effects */
    vertical-align: middle; /* Ensures alignment with text inputs */
    border: none; /* Removes default borders if any */
}

    /* Optional: Adds a subtle zoom effect when hovering */
    .asImgbtn:hover {
        transform: scale(1.1);
        opacity: 0.9;
    }

/* --- COURSE CONTENT VIEWER STYLES --- */

.form-header h1 {
    color: mediumpurple;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 1. THE MAIN LAYOUT GRID */
.course-viewer-grid {
    display: grid;
    /* Desktop: Left col 350px, Right col takes remaining space */
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start; /* Prevents stretching height */
}

/* 2. THE LIST (Left Side) */
.course-nav-panel {
    background: white;
    border: 1px solid lightgray;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Clean GridView Reset */
.course-list-grid {
    width: 100%;
    border: none;
}

/* The item row (Flexbox instead of nested tables) */
.course-item-row {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

    .course-item-row:hover {
        background-color: #f9f9f9;
    }

/* Selected Item Styling */
.course-item-selected .course-item-row {
    background-color: mediumpurple; /* Highlight active item */
}

.course-item-selected .course-item-title,
.course-item-selected .course-item-type {
    color: white;
}

/* Thumbnail */
.course-item-thumb {
    width: 80px;
    margin-right: 15px;
    flex-shrink: 0; /* Don't squash image */
}

.content-image-thumb {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
}

/* Text Details */
.course-item-details {
    display: flex;
    flex-direction: column;
}

.course-item-title {
    font-weight: bold;
    color: #333;
    text-decoration: none;
    font-size: 1rem;
    margin-bottom: 4px;
    cursor: pointer;
}

.course-item-type {
    font-size: 0.85rem;
    color: #888;
}

/* 3. THE DISPLAY (Right Side) */
.course-display-panel {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid lightgray;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    min-height: 500px;
}

/* Responsive Video (16:9 Aspect Ratio Lock) */
.responsive-iframe-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #1a1a1a;
}

    .responsive-iframe-container iframe {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        border: 0;
    }

/* Text Content Area */
.text-content-area {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #333;
}

/* RESPONSIVE: Stack on Mobile */
@media (max-width: 900px) {
    .course-viewer-grid {
        grid-template-columns: 1fr; /* Single column */
    }

    /* Move display to top on mobile? Or keep list on top? 
       Usually list on top is safer. */

    .course-display-panel {
        min-height: 300px;
    }
}

/* --- MANAGEMENT FORM STYLES (Add to ssxalta.css) --- */

/* Split layout: Inputs (Left) - Image (Right) */
.management-grid {
    display: grid;
    grid-template-columns: 1fr 300px; /* Inputs take remaining space, Image takes 300px */
    gap: 30px;
    align-items: start;
}

/* The Left side: A grid for the text inputs (2 columns) */
.management-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Helper to make Description/TextAreas span the full width of the input area */
.span-full {
    grid-column: 1 / -1;
}

/* The Right side: Image Container */
.management-image-section {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #eee;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Image styling (Moved from your inline style) */
.asPicCrs {
    width: 100%;
    max-width: 200px;
    height: 200px;
    object-fit: cover; /* Ensures image fits box without stretching */
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

/* Button Group alignment */
.button-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
    .management-grid {
        grid-template-columns: 1fr; /* Stack vertically */
    }

    .management-image-section {
        order: -1; /* Move image to top on mobile */
        margin-bottom: 20px;
    }
}
/*ENROLLMENTS*/

/* Ensures the 3 selection lists sit side-by-side */
.selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card style for the selection lists */
.selection-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid lightgray;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .selection-card h3 {
        margin-top: 0;
        color: #333;
        border-bottom: 2px solid mediumpurple;
        padding-bottom: 5px;
        width: 100%;
        text-align: center;
    }

    /* Align the Add buttons to the bottom of the card */
    .selection-card .button {
        margin-top: auto;
        width: auto;
        min-width: 100px;
    }

.buttongrid {
    height: 20px;
    width: 20px;
    transition: transform 0.2s ease;
}
    .buttongrid:hover {
        transform: scale(1.1);
    }
/*ALPHABET PAGER*/
.AlphabetPager {
    margin-bottom: 15px;
}

    .AlphabetPager a, .AlphabetPager span {
        font-size: 10pt;
        display: inline-block;
        height: 25px; /* Increased slightly for touch targets */
        line-height: 25px;
        min-width: 25px;
        text-align: center;
        text-decoration: none;
        font-weight: bold;
        padding: 0 5px;
        margin-right: 3px;
        border-radius: 3px;
    }

    .AlphabetPager a {
        background-color: #f4f6f9;
        color: black;
        border: 1px solid darkgray;
    }

    .AlphabetPager span {
        background-color: mediumpurple;
        color: white; /* Changed to white for better contrast */
        border: 1px solid mediumpurple;
    }

.profile-img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
    border: 1px solid mediumpurple;
    margin-top: 10px;
}

/* --- PASSWORD TOGGLE STYLES --- */

/* Relative container to hold the input and the icon */
.password-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

    /* Ensure the password input takes full width */
    .password-wrapper .input-field {
        width: 100%;
        /* Add padding to the right so text doesn't go under the icon */
        padding-right: 40px;
    }

/* The Eye Icon */
.toggle-icon {
    position: absolute;
    right: 15px; /* Distance from the right edge */
    cursor: pointer;
    color: #888; /* Gray color */
    z-index: 2;
    font-size: 1rem;
    transition: color 0.3s ease;
}

    /* Hover effect for the icon */
    .toggle-icon:hover {
        color: mediumpurple; /* Matches your theme color */
    }

/* Additional styles specific to the Forgot Password page */
.form-instructions {
    color: lightgray;
    font-size: 0.9rem;
    line-height: 1.5;
    text-align: center;
    margin-bottom: 10px;
}

.recovery-step {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.recovery-label {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Ensure the error labels stand out */
.validation-error {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-top: 2px;
}