/* Exam Marks Manager Pro - Modern Dashboard Styling */
#emm-app-wrapper {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    margin: 20px auto;
    max-width: 1350px;
}

/* Login Screen */
.emm-login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 520px;
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 30px;
}
.emm-login-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 14px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}
.emm-login-header { text-align: center; margin-bottom: 24px; }
.emm-login-header h2 { margin: 0 0 6px; color: #1e3a8a; font-size: 22px; }
.emm-login-header p { margin: 0; color: #64748b; font-size: 14px; }
.emm-role-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 20px;
}
.emm-tab-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    color: #475569;
    transition: 0.2s;
}
.emm-tab-btn.active {
    background: #2563eb;
    color: #fff;
}

/* Dashboard Layout */
.emm-dashboard {
    display: flex;
    min-height: 680px;
}
.emm-sidebar {
    width: 260px;
    background: #0f172a;
    color: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 20px 0;
    flex-shrink: 0;
}
.emm-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 20px 20px;
    border-bottom: 1px solid #1e293b;
}
.emm-logo { font-size: 28px; }
.emm-brand strong { display: block; font-size: 17px; color: #fff; }
.emm-brand small { color: #94a3b8; font-size: 12px; }

.emm-nav-menu {
    list-style: none;
    padding: 15px 10px;
    margin: 0;
    flex-grow: 1;
}
.emm-nav-item {
    padding: 12px 16px;
    margin-bottom: 6px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    color: #cbd5e1;
    transition: all 0.2s;
}
.emm-nav-item:hover {
    background: #1e293b;
    color: #fff;
}
.emm-nav-item.active {
    background: #2563eb;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}
.emm-sidebar-footer {
    padding: 15px 20px 0;
    border-top: 1px solid #1e293b;
}
.emm-user-badge {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 10px;
    word-break: break-word;
}

/* Main Content */
.emm-main-content {
    flex-grow: 1;
    padding: 28px;
    background: #f8fafc;
    overflow-x: auto;
}
.emm-view { display: none; }
.emm-view.active { display: block; }
.emm-page-header { margin-bottom: 22px; }
.emm-page-header h2 { margin: 0 0 5px; color: #0f172a; font-size: 22px; }
.emm-page-header p { margin: 0; color: #64748b; font-size: 14px; }

.emm-card {
    background: #fff;
    border-radius: 10px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}
.emm-card h3 { margin-top: 0; font-size: 17px; color: #1e293b; margin-bottom: 16px; }

/* Forms & Inputs */
.emm-form-group { margin-bottom: 15px; }
.emm-form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: #334155; }
.emm-form-group input, .emm-form-group select, .emm-grid-form input, .emm-filter-bar select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    font-size: 14px;
    box-sizing: border-box;
}
.emm-grid-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.emm-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.emm-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}
.emm-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    background: #fff;
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    border: 1px solid #e2e8f0;
    flex-wrap: wrap;
}
.emm-filter-bar select { max-width: 240px; }

/* Buttons */
.emm-btn {
    padding: 10px 16px;
    border: none;
    border-radius: 7px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.emm-btn-block { width: 100%; }
.emm-btn-primary { background: #2563eb; color: #fff; }
.emm-btn-primary:hover { background: #1d4ed8; }
.emm-btn-secondary { background: #64748b; color: #fff; }
.emm-btn-success { background: #16a34a; color: #fff; }
.emm-btn-warning { background: #d97706; color: #fff; }
.emm-btn-danger { background: #dc2626; color: #fff; }
.emm-btn-sm { padding: 6px 10px; font-size: 12px; }

/* Tables */
.emm-table-responsive { width: 100%; overflow-x: auto; }
.emm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.emm-table th, .emm-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}
.emm-table th {
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
}
.emm-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-active, .badge-final { background: #dcfce7; color: #166534; }
.badge-inactive, .badge-pending { background: #fee2e2; color: #991b1b; }
.badge-draft { background: #fef3c7; color: #92400e; }

.emm-info-box {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 13px;
}
.emm-alert {
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid #fecaca;
}

/* Modal */
.emm-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.65);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.emm-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 960px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}
.emm-modal-header {
    padding: 16px 22px;
    background: #1e3a8a;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.emm-modal-header h3 { margin: 0; font-size: 18px; }
.emm-close-modal {
    background: none; border: none; color: #fff; font-size: 24px; cursor: pointer;
}
.emm-modal-body { padding: 20px 22px; }
.emm-modal-footer {
    padding: 15px 22px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}
.mark-input {
    width: 85px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-weight: 600;
}
.mark-input.input-error {
    border-color: #dc2626 !important;
    background-color: #fef2f2 !important;
    color: #991b1b;
}

@media (max-width: 768px) {
    .emm-dashboard { flex-direction: column; }
    .emm-sidebar { width: 100%; }
}

/* Updated Top Institutional Header & Colleges Showcase */
.emm-public-home {
    max-width: 1350px;
    margin: 12px auto 0;
    padding: 12px 20px;
    text-align: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 60%, #2563eb 100%);
    color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}
.emm-header-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    color: #fde047;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    padding: 2px 10px;
    border-radius: 15px;
    margin-bottom: 6px;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
.emm-public-home h1 {
    margin: 0 0 2px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #ffffff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}
.emm-public-home .emm-header-sub {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #bfdbfe;
}
.emm-home-notice {
    margin: 16px auto 0;
    padding: 10px 16px;
    background: rgba(254, 243, 199, 0.95);
    color: #92400e;
    font-weight: 600;
    border-radius: 8px;
    max-width: 900px;
}
.emm-added-colleges-showcase {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
}
.emm-showcase-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #93c5fd;
    margin-bottom: 14px;
}
.emm-colleges-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
.emm-college-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 9px 16px;
    border-radius: 50px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, background 0.2s ease;
}
.emm-college-pill:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.22);
}
.emm-pill-code {
    background: #fde047;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
@media (max-width: 768px) {
    .emm-public-home h1 { font-size: 20px; }
    .emm-public-home .emm-header-sub { font-size: 14px; }
}


/* Student marks quick search */
.emm-mark-search-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 12px;padding:10px 12px;background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px}
.emm-mark-search-bar label{font-weight:700;font-size:13px;color:#1e3a8a}
.emm-mark-search-bar input{flex:1;min-width:220px;max-width:460px;padding:9px 11px;border:1px solid #93c5fd;border-radius:6px;font-size:14px}
#emm-mark-search-count{font-size:12px;color:#475569;font-weight:600}

