/* ==========================================================================
   REOS MASTER PROFESSIONAL STYLESHEET
   Integration of High-End Branding & Existing Technical Logic
   ========================================================================== */

/* --- REOS BRANDED DYNAMIC VARIABLES --- */
:root {
    --sidebar-bg: #0a192f;   
    --main-bg: #f8fafc;      
    --surface-bg: #ffffff;
    
    /* NEW VIBRANT PALETTE */
    --reos-orange: #ff5e13;  /* Vibrant Orange from logo */
    --reos-blue: #2563eb;    /* Electric Blue from logo */
    --reos-silver: #94a3b8;  /* Sleek Silver Accent */
    
    --primary-blue: #2563eb;
    --accent-blue: #f0f7ff;  
    --text-dark: #1e293b;
    --text-light: #64748b;
    --success: #10b981;

    /* DYNAMIC GRADIENT BASED ON ATTACHMENT */
    --reos-gradient: linear-gradient(135deg, #ff5e13 0%, #2563eb 100%);
}

/* --- CORE LAYOUT & SCROLLING ENGINE --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Inter', sans-serif;
    background: var(--main-bg);
    color: var(--text-dark);
    overflow: hidden; 
}

.app-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* --- 1. SIDEBAR NAVIGATION --- */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    padding: 25px;
    flex-shrink: 0;
    z-index: 10;
}

.logo-area { margin-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 20px; }
.logo-area h2 { font-weight: 800; font-size: 1.8rem; letter-spacing: 1px; }
.logo-area p { color: #8892b0; font-size: 0.8rem; margin-top: 5px; }
.tm { font-size: 0.8rem; vertical-align: top; }

.nav-links { list-style: none; flex-grow: 1; }
.nav-links li {
    padding: 12px 15px;
    margin-bottom: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #a0aec0;
    font-size: 0.95rem;
    transition: 0.2s;
    display: flex; align-items: center;
}
.nav-links li i { width: 25px; }

.nav-links li:hover, .nav-links li.active {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
}

.bottom-links { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; }
.back-link { display: block; color: #8892b0; font-size: 0.85rem; text-decoration: none; margin-bottom: 20px; }
.back-link:hover { color: white; }

.btn-login {
    width: 100%; padding: 10px; background: transparent;
    border: 1px solid #64ffda; color: #64ffda;
    border-radius: 4px; cursor: pointer; font-weight: 600;
}
.btn-login:hover { background: rgba(100,255,218,0.1); }

/* --- 2. DYNAMIC MAIN CONTENT AREA --- */
.main-content {
    padding: 0 40px 40px 40px;
    flex-grow: 1;
    overflow-y: auto;
    height: 100%;
    background: radial-gradient(at 0% 0%, var(--accent-blue) 0%, transparent 50%),
                radial-gradient(at 100% 100%, #f1f5f9 0%, transparent 50%);
}

.top-bar {
    padding: 20px 0;
    display: flex; justify-content: space-between; align-items: center;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 30px;
}
.breadcrumbs { font-size: 0.85rem; color: var(--text-light); }
.user-status { font-size: 0.8rem; color: var(--success); font-weight: 600; }
.dot { height: 8px; width: 8px; background: var(--success); border-radius: 50%; display: inline-block; margin-left: 5px; }

/* --- 3. HERO & TYPOGRAPHY --- */
.hero-section { 
    padding: 60px 0;
    border-bottom: 1px solid rgba(0, 68, 204, 0.1);
    margin-bottom: 50px;
}
.hero-text h1 { font-size: 2.5rem; font-weight: 800; color: var(--sidebar-bg); line-height: 1.2; }
.highlight { color: var(--primary-blue); }
.hero-sub { 
    font-size: 1.1rem; color: #4a5568; margin-top: 15px; 
    line-height: 1.8; max-width: 100% !important; white-space: nowrap; 
}
.indented-line { display: inline-block; padding-left: 40px; margin-top: 10px; font-style: italic; color: var(--sidebar-bg); opacity: 0.8; }

/* --- 4. PROFESSIONAL CARDS (GLASS-MORPHISM) --- */
.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 20px;
    width: 100%; /* Ensures the card doesn't collapse */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.1);
    border-color: var(--reos-orange);
    background: #ffffff;
}

/* Updated Table Container to fix distortion */
.table-container.card {
    padding: 0; /* Ensures table fills the card edge-to-edge */
    overflow: hidden; /* Clips the background to match rounded corners */
    display: block; /* Prevents grid/flex interference */
}

.card h3 { 
    font-size: 1.1rem; 
    font-weight: 700; 
    margin-bottom: 15px; 
    border-left: 3px solid var(--reos-blue); 
    padding-left: 12px; 
}

.feature-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px;
}

/* --- 6. DOCUMENTATION & LICENSING --- */
/* --- UPDATED SECTION TITLES --- */
.section-title {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 1.4rem;
    color: var(--sidebar-bg);
    border-bottom: 3px solid transparent;
    border-image: var(--reos-gradient); /* Gradient underline */
    border-image-slice: 1;
    margin-bottom: 30px;
    padding-bottom: 10px;
}

.doc-list { display: flex; flex-direction: column; gap: 15px; }
.doc-item {
    background: white; padding: 20px; border-radius: 8px; display: flex; align-items: center;
    border: 1px solid #e2e8f0; transition: 0.2s;
}
.doc-item:hover { transform: translateX(5px); border-color: var(--primary-blue); }
.doc-item i { font-size: 2rem; color: var(--text-light); margin-right: 20px; }
.doc-info { flex-grow: 1; }
.check-list { list-style: none; margin-top: 20px; }
.check-list li { margin-bottom: 10px; color: var(--text-light); display: flex; align-items: center; }
.check-list i { color: var(--success); margin-right: 10px; }

/* --- 7. MODALS & FORMS --- */
.modal-overlay {
    display: none; position: fixed; z-index: 1000; left: 0; top: 0;
    width: 100%; height: 100%; background-color: rgba(10, 25, 47, 0.7);
    justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.modal-content {
    background-color: #fff; padding: 40px; border-radius: 12px;
    width: 100%; max-width: 500px; position: relative;
    box-shadow: 0 20px 50px 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; } }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 28px; font-weight: bold; color: #aaa; cursor: pointer; }
.form-group { margin-bottom: 20px; }
.form-row { display: flex; gap: 15px; }
.half-width { flex: 1; }
.btn-submit {
    background: var(--reos-gradient); /* Gradient buttons */
    border: none;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.2);
}

.btn-submit:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 94, 19, 0.3);
}
textarea, select, input { 
    width: 100%; padding: 12px; border: 1px solid #e2e8f0; border-radius: 6px; 
    font-size: 1rem; outline: none; transition: 0.2s; 
}

/* --- 8. ACTION BUTTONS --- */
.btn-outline {
    background: transparent; color: var(--sidebar-bg); border: 2px solid var(--sidebar-bg);
    padding: 12px 20px; border-radius: 6px; font-weight: bold; cursor: pointer;
}
.btn-sm { padding: 8px 15px; background: #edf2f7; color: var(--text-dark); border: none; border-radius: 4px; font-weight: 600; cursor: pointer; }

/* --- 9. MOBILE ADAPTATION ENGINE --- */
@media (max-width: 900px) {
    .app-container { 
        flex-direction: column; 
        height: auto; 
        overflow: visible; 
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: sticky;
        top: 0;
        display: flex;
        flex-direction: column; /* This creates your 3-row layout */
        padding: 15px;
        gap: 12px;
        background: var(--sidebar-bg);
        z-index: 2000;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    /* Row 1: Logo */
    .logo-area {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 8px;
    }

    /* Row 2: Navigation (Pills) */
    .nav-links {
        display: flex;
        flex-direction: row !important;
        overflow-x: auto;
        gap: 8px;
        padding: 5px 0;
        scrollbar-width: none;
    }
    .nav-links::-webkit-scrollbar { display: none; }
    .nav-links li { 
        white-space: nowrap; 
        background: rgba(255,255,255,0.05);
        border-radius: 20px;
        padding: 8px 15px;
    }

    /* Row 3: Utility Links */
    .bottom-links {
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding-top: 10px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    /* Fix Content & Carousel for Mobile */
    body { overflow: auto !important; }
    .main-content { padding: 20px 15px; height: auto; overflow: visible; }
    
    .carousel-wrapper { height: 300px; } /* Prevents video from eating the whole screen */
    .feature-grid { grid-template-columns: 1fr; }
    .modal-content { width: 95%; }

    /* E-Learning Table Mobile Fix */
    .table-container {
        display: block;
        width: 100%;
        overflow-x: auto; /* Allows side-swiping the table data */
        -webkit-overflow-scrolling: touch;
    }

    /* --- PASTE YOUR NEW CODE HERE --- */
    .elearning-table td {
        min-width: 140px; /* Prevents date and button from squishing */
        text-align: center;
    }

    .reg-btn-container {
        width: 100%;
        display: flex;
        justify-content: center; /* Ensures the button is centered in the cell */
    }
}

/* --- RE-INSERTING YOUR GLOBAL STYLES (Keep these at the bottom) --- */
.legal-footer { margin-top: 60px; padding: 20px 0; border-top: 1px solid #e2e8f0; text-align: center; font-size: 0.85rem; color: var(--text-light); }

.demo-carousel-container { margin: 40px 0; position: relative; border-radius: 12px; overflow: hidden; background: rgba(255, 255, 255, 0.9); backdrop-filter: blur(10px); border: 1px solid rgba(226, 232, 240, 0.8); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05); }

.carousel-wrapper { position: relative; width: 100%; height: 500px; display: flex; align-items: center; }

.carousel-track { width: 100%; height: 100%; position: relative; }

.slide { position: absolute; width: 100%; height: 100%; opacity: 0; transition: opacity 0.5s ease-in-out; display: flex; flex-direction: column; }

.slide.active { opacity: 1; position: relative; }

.slide img, .slide video { width: 100%; height: 100%; object-fit: cover; }

.slide-caption { position: absolute; bottom: 0; width: 100%; background: rgba(10, 25, 47, 0.8); color: white; padding: 15px; text-align: center; font-weight: 600; }

.carousel-btn { position: absolute; z-index: 10; background: var(--primary-blue); color: white; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; font-size: 1.2rem; transition: 0.3s; }

.play-overlay { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 15; width: 80px; height: 80px; background: rgba(0, 68, 204, 0.8); border-radius: 50%; display: none; align-items: center; justify-content: center; color: white; font-size: 2rem; cursor: pointer; transition: 0.3s; }

.carousel-indicators { position: absolute; bottom: 60px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 20; }

.dot { width: 10px; height: 10px; background: rgba(255, 255, 255, 0.5); border-radius: 50%; cursor: pointer; transition: all 0.3s ease; }

.dot.active { background: var(--reos-orange); transform: scale(1.4); box-shadow: 0 0 10px rgba(255, 94, 19, 0.5); }

.elearning-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.95rem; }

.elearning-table th { padding: 18px 20px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.8px; font-size: 0.8rem; }

.elearning-table td { padding: 20px 20px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }

.btn-submit { background: var(--reos-gradient); border: none; transition: 0.3s ease; }
