/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Global Font - Poppins */
body, input, textarea, select, button, table {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* KaTeX styles */
.katex .katex-mathml {
    display: none !important;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #ddd;
}

.close-modal {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #000;
}

/* Math Modal styles */
.btn-math {
    padding: 4px 8px;
    margin-left: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-math:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

.preview-box {
    padding: 15px;
    min-height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-preview {
    color: #6c757d;
    font-style: italic;
}

.error-preview {
    color: #dc3545;
    font-size: 14px;
}

.math-content {
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

/* Form layout styles */
.form-row {
    display: flex;
    margin-right: -15px;
    margin-left: -15px;
    flex-wrap: wrap;
}

.form-row > .form-group {
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 1rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.form-group {
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.label-with-button {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #1f6fb7;
    border: 1px solid #155789;
}

.btn-primary:hover {
    background-color: #155789;
    border-color: #13496a;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-math {
    padding: 4px 8px;
    margin-left: 8px;
    font-size: 16px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-math:hover {
    background: #e9ecef;
    border-color: #ced4da;
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
}

.modal-content {
    position: relative;
    background: #fff;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 600px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.close-modal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
    opacity: 0.5;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

.close-modal:hover {
    opacity: 0.75;
}

.preview-box {
    padding: 15px;
    min-height: 60px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #f8f9fa;
    margin: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-preview {
    color: #6c757d;
    font-style: italic;
}

.error-preview {
    color: #dc3545;
    font-size: 14px;
}

.math-content {
    margin: 1rem 0;
    padding: 0.5rem;
    background: #f8f9fa;
    border-radius: 4px;
    text-align: center;
}

/* CKEditor customizations */
.ck-editor__editable {
    min-height: 200px;
}

.ck.ck-editor__main > .ck-editor__editable {
    background-color: #ffffff;
}

.ck.ck-toolbar {
    border-radius: 4px 4px 0 0;
}

.ck.ck-editor__main > .ck-editor__editable {
    border-radius: 0 0 4px 4px;
}

/* Math expression styles in editor */
.ck-content .math-tex {
    padding: 8px;
    margin: 1em 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    text-align: center;
}

.modal-body {
    padding: 1rem 0;
}

.math-examples {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 4px;
}

.math-examples ul {
    list-style: none;
    padding-left: 0;
}

.math-examples li {
    margin: 0.5rem 0;
    font-family: monospace;
}

/* Toolbar styles */
.toolbar {
    margin-bottom: 1rem;
}

.toolbar button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    font-size: 1rem;
}

/* CKEditor styles */
.ck.ck-editor {
    width: 100%;
}

.ck.ck-editor__main > .ck-editor__editable {
    min-height: 150px;
    max-height: 400px;
}

.ck.ck-toolbar {
    border-color: #ddd;
}

/* Ensure textareas are full width before CKEditor loads */
textarea {
    width: 100%;
    min-height: 150px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: inherit;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* Index page hero & features styling */
.hero {
    /* lighter, sober palette: soft cool neutral gradient */
    background: linear-gradient(135deg, #D5E4F2 0%, #D5E4F2 70%);
    color: #0b1a20;
    padding: 5rem 1rem;
}
.hero .hero-content { max-width: 1100px; margin: 0 auto; text-align: left; }
.hero-grid { display: grid; grid-template-columns: 1fr 420px; gap: 2rem; align-items: center; max-width:1100px; margin:0 auto; }
.hero-left { padding-right: 1rem; }
.hero-right { min-height: 240px; }
.hero-img { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; border-radius: 10px; }

/* Hero auth card tweaks */
.hero .hero-auth { max-width: 420px; margin: 0 auto; background: #5c7e90; padding: 1.15rem; border-radius: 12px; border: 1px solid rgba(255,255,255,0.06); box-shadow: 0 12px 30px rgba(10,20,26,0.18); color: #eef6fb; }
.hero .hero-auth h2 { margin-top: 0; font-size: 1.25rem; color: #eef6fb; margin-bottom: 0.5rem; }
.hero .hero-auth .form-group input,
.hero .hero-auth .form-group select {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
}
.hero .hero-auth label { color: rgba(238,246,251,0.9); font-size: 0.95rem; }
.hero .hero-auth .btn-primary { background: #1f6fb7; border: none; }
.hero .hero-auth .btn-primary:hover { background: #155789; }
.hero .hero-auth .form-footer { margin-top: 0.6rem; font-size: 0.92rem; }
.hero .hero-auth .form-footer a { color: #d9eefc; text-decoration: underline; }

/* compact buttons and actions (right-aligned) */
.btn-compact { padding: 0.45rem 0.9rem; font-size: 0.92rem; border-radius: 8px; }
.btn-outline { background: transparent; color: #d9eefc; border: 1px solid rgba(255,255,255,0.12); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.auth-actions { display:flex; gap:0.5rem; align-items:center; justify-content:flex-end; width:100%; }

/* auth message */
.auth-message { margin-top: 0.6rem; padding: 0.6rem 0.7rem; border-radius: 6px; font-size: 0.95rem; }
.auth-message.success { background: rgba(34,197,94,0.12); color: #dcfce7; border: 1px solid rgba(34,197,94,0.14); }
.auth-message.error { background: rgba(220,53,69,0.08); color: #ffecec; border: 1px solid rgba(220,53,69,0.12); }
.hero h1 { font-size: 2.4rem; margin-bottom: 0.5rem; font-weight: 700; color: #102334; }
.hero p { font-size: 1.04rem; opacity: 0.92; margin-bottom: 1.25rem; color: #3b5058; }
.hero .cta-buttons .btn { margin-right: 0.75rem; }

.brand { font-weight:700; color: #24343f; margin: 0; }
.brand .muted { font-weight: 400; color: #6c757d; font-size: 0.85rem; margin-left: 6px; }
.navbar-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-img { height: 36px; width: auto; display: inline-block; }
.brand-text { font-weight:700; color: #24343f; font-size: 1.05rem; }

.features { padding: 3rem 1rem; max-width: 1100px; margin: 0 auto; }
.features h2 { text-align: center; margin-bottom: 1.5rem; font-size: 1.8rem; color: #2c4e60; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.25rem; }
.feature-card { background: white; padding: 1.25rem; border-radius: 10px; box-shadow: 0 6px 18px rgba(16,24,40,0.06); }
.feature-icon { font-size: 2.2rem; margin-bottom: 0.5rem; }
.feature-card h3 { margin-bottom: 0.5rem; color: #24343f; }
.feature-list { margin-top: 0.75rem; list-style: none; padding-left: 0; }
.feature-list li { padding: 0.35rem 0; color: #4b5563; }

/* feature card hover / subtle animation */
.feature-card { transition: transform 0.18s ease, box-shadow 0.18s ease; }
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 12px 30px rgba(16,24,40,0.08); }

.features-lead { text-align: center; color: #596a75; margin-bottom: 1rem; }

/* Footer styles */
footer { background: #f3f6f8; padding: 2rem 1rem; margin-top: 2.5rem; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; align-items: start; }
.footer-logo { display:flex; align-items:center; gap:10px; }
.footer-logo img { height: 36px; }
.footer-links { list-style:none; padding-left:0; }
.footer-links li { margin-bottom:0.6rem; }
.footer-links a { color: #34444d; text-decoration:none; font-size:0.95rem; }
.footer-links a:hover { text-decoration:underline; }
.footer-small { color: #6c757d; font-size:0.9rem; margin-top:0.6rem; }

/* small device adjustments */
@media (max-width: 520px) {
    .hero h1 { font-size: 1.5rem; }
    .brand { font-size: 1.25rem; }
}

@media (max-width: 880px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-right { display: none; }
}

    /* Math button styles */
    .label-with-button {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .math-btn {
        padding: 0.2rem 0.5rem !important;
        font-size: 0.9rem !important;
        background-color: #4a90e2 !important;
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        cursor: pointer !important;
        transition: background-color 0.2s !important;
    }

    .math-btn:hover {
        background-color: #357abd !important;
    }

    /* Image button styles */
    .img-btn {
        padding: 0.2rem 0.45rem !important;
        font-size: 0.9rem !important;
        background-color: #2ecc71 !important;
        color: white !important;
        border: none !important;
        border-radius: 4px !important;
        cursor: pointer !important;
        transition: background-color 0.2s !important;
    }
    .img-btn:hover { background-color: #28b463 !important; }

    /* Hidden file input for inserting images */
    .hidden-file-input { display: none; }

/* Banner styles */
.banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #2c4e60; /* Material Design Indigo - lighter and modern */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.logo a {
    text-decoration: none;
    color: inherit;
}

/* Navigation and buttons */
.nav-buttons {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-login {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid #ffffff;
}

.btn-register {
    background-color: #00c853; /* Green color for better contrast */
    color: white;
    border: 2px solid #00c853;
}

.btn-primary {
    background-color: #1f6fb7;
    color: white;
    border: none;
}

.btn-secondary {
    background-color: #3b4753;
    color: white;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Main content */
main {
    /* leave room for the fixed banner so content doesn't sit underneath it */
    margin-top: 20px;
    min-height: calc(100vh - 80px);
}

/* Hero section */
/* (Index-specific hero styles are defined earlier) */
/* Hero section styling handled in "Index page hero & features styling" above */

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Features section */
.features {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.features h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

/* Authentication forms */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: white;
    min-width: 90%;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.auth-card h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    cursor: pointer;
}

.form-footer {
    margin-top: 1.5rem;
    text-align: center;
}

.form-footer a {
    color: #3498db;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

.forgot-password {
    display: block;
    text-align: right;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: #2c3e50;
    color: white;
}

/* Responsive design */
@media (max-width: 768px) {
    .banner-content {
        padding: 1rem;
    }

    .logo h1 {
        font-size: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .feature-grid {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: calc(100vh - 40px);
    background-color: #f5f7fa;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background: #dcdee0;
    box-shadow: 2px 0 8px rgba(44,78,96,0.07);
    color: #2c4e60;
    /* make sidebar stick under the fixed banner and scroll internally */
    position: sticky;
    top: 80px; /* matches banner height/margin-top on container */
    height: calc(100vh - 80px);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto; /* allow vertical scrolling */
    overflow-x: hidden; /* prevent horizontal scrolling */
    -webkit-overflow-scrolling: touch;
    transition: width 0.18s ease, transform 0.18s ease;
}

/* Ensure the menu inside the sidebar can scroll horizontally if required */
.sidebar-menu {
    overflow-x: hidden; /* prevent horizontal scrollbar */
    overflow-y: visible;
    white-space: normal; /* allow wrapping instead of nowrap */
    list-style: none;
    padding: 1.2rem 0.75rem 1.5rem 0.75rem;
}
.sidebar-menu li {
    margin-bottom: 0.7rem;
}
.sidebar-menu li,
.sidebar-menu .menu-item {
    white-space: normal; /* allow wrapping for items; horizontal scroll available if needed */
}
.menu-title {
    display: block;
    padding: 0.65rem 1rem;
    font-weight: 600;
    font-size: 1rem;
    color: #2c4e60;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.menu-title:hover {
    background: #f5f7fb;
    color: #1a4b6e;
}
.submenu {
    list-style: none;
    padding-left: 1.2rem;
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.28s cubic-bezier(.2,.9,.2,1), padding 0.18s ease;
}
.submenu.open {
    max-height: 1000px; /* large enough to show content; transitions will animate */
    overflow: auto;
}
.submenu li {
    margin-bottom: 0.2rem;
}
.submenu li a {
    display: block;
    padding: 0.45rem 0.9rem;
    color: #2c4e60;
    text-decoration: none;
    font-size: 0.98rem;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
}
.submenu li a:hover {
    background: #e3e6f3;
    color: #1a4b6e;
}

/* Sidebar menu item with icon */
.menu-title, .submenu li a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}
.menu-text {
    transition: opacity 0.18s ease, width 0.18s ease, transform 0.18s ease;
    white-space: nowrap;
}
.sidebar.collapsed .menu-title .menu-text,
.sidebar.collapsed .submenu li a .menu-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}
.sidebar.collapsed .menu-title,
.sidebar.collapsed .submenu li a {
    justify-content: center;
}

/* Ensure submenu is still usable when sidebar is collapsed: show as overlay on hover */
.sidebar.collapsed .menu-item:hover > .submenu {
    position: absolute;
    left: 64px;
    top: 0;
    background: #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    padding: 0.5rem;
    border-radius: 6px;
    max-height: 300px;
    overflow: auto;
    z-index: 999;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    position: absolute;
    top: 18px;
    right: -22px;
    width: 40px;
    height: 40px;
    background: #2c4e60;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(44,78,96,0.13);
    border: none;
    cursor: pointer;
    font-size: 1.3rem;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
}
.sidebar-toggle { pointer-events: auto; }
.sidebar-toggle:hover {
    background: #1a4b6e;
    transform: scale(1.08);
}

/* Sidebar collapsed state */
.sidebar.collapsed {
    width: 64px !important;
}

/* Main Content Area */
.main-content {
    flex: 1;
    padding: 2rem 2.5rem 2rem 2.5rem;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 75vw;
    max-width: 1200px;
    margin-right: auto;
}
.main-content h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Table Styles */
.table {
    width: 120%;

    margin-left: auto;
    margin-right: auto;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(44,78,96,0.07);
    margin-bottom: 1.5rem;
    overflow: hidden;
}
.table th {
    background: #eaecef;
    color: #2c4e60;
    font-weight: 600;
    text-align: left;
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #b0b0b0;
}
.table td {
    padding: 0.8rem 1rem;
    color: #3f3f3f;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.98rem;
}
.table tr:last-child td {
    border-bottom: none;
}
.table tr:hover td {
    background: #f5f7fb;
}

/* Batch card view for teacher dashboard */
.batch-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}
.batch-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(44,78,96,0.07);
    padding: 1.5rem 1.2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: box-shadow 0.2s, transform 0.2s;
    border: 1px solid #e0e0e0;
    cursor: pointer;
}
.batch-card:hover {
    box-shadow: 0 6px 18px rgba(44,78,96,0.13);
    transform: translateY(-4px) scale(1.02);
}
.batch-card h3 {
    font-size: 1.2rem;
    color: #2c4e60;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Universal Subject Card View Styles */
.subject-cards {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.subject-card {
    flex: 1 1 140px;
    min-width: 140px;
    max-width: 200px;
    max-height: 150px;
    background: linear-gradient(135deg, #f5f7fb 60%, #e3e6f3 100%);
    padding: 1.2rem 0.8rem 1.1rem 0.8rem;
    border-radius: 16px;
    box-shadow: 0 4px 18px rgba(44,78,96,0.10), 0 1.5px 4px rgba(44,78,96,0.07);
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s, background 0.18s;
    text-align: center;
    border: 2.5px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    position: relative;
    overflow: hidden;
}
.subject-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 80px;
    height: 80px;
    background: linear-gradient(120deg, #3f51b5 0%, #00bcd4 100%);
    opacity: 0.08;
    border-radius: 50%;
    z-index: 0;
}
.subject-icon {
    font-size: 2.3rem;
    color: #3f51b5;
    height: 56px;
    width: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e8eaf6 60%, #f5f7fb 100%);
    border-radius: 50%;
    margin-bottom: 0.2rem;
    box-shadow: 0 2px 8px rgba(44,78,96,0.10);
    z-index: 1;
}
.subject-card.selected .subject-icon {
    background: linear-gradient(135deg, #3f51b5 60%, #00bcd4 100%);
    color: #fff;
}
.subject-card:hover {
    transform: translateY(-7px) scale(1.03);
    box-shadow: 0 8px 28px rgba(44,78,96,0.16), 0 2px 8px rgba(44,78,96,0.10);
    border-color: #3f51b5;
    background: linear-gradient(135deg, #e3e6f3 80%, #f5f7fb 100%);
}
.subject-card.selected {
    border-color: #3f51b5;
    background: linear-gradient(135deg, #e8eaf6 80%, #f5f7fb 100%);
}
.subject-card h3 {
    margin: 0;
    color: #2c4e60;
    font-size: 1.18rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    z-index: 1;
}