@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Color Palette */
    --bg-primary: #0b0f19;
    --bg-secondary: #161e31;
    --bg-card: rgba(22, 30, 49, 0.7);
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(59, 130, 246, 0.3);
    
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #a0aec0;
    
    --color-accent: #3b82f6; /* Blue */
    --color-accent-hover: #2563eb;
    --color-success: #10b981; /* Emerald */
    --color-warning: #f59e0b; /* Amber */
    --color-danger: #ef4444; /* Rose */
    --color-gold: #fbbf24; /* Gold */
    
    --font-ar: 'Cairo', sans-serif;
    --font-en: 'Outfit', sans-serif;
    
    --shadow-sm: 0 2px 8px -1px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 12px 20px -8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
}

/* Base resets & styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-ar);
    direction: rtl; /* Default is Arabic */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

body::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, rgba(0,0,0,0) 70%);
    z-index: -1;
    pointer-events: none;
}

/* LTR layout override */
body.ltr {
    font-family: var(--font-en);
    direction: ltr;
}

/* Typography elements */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

/* Layout container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* Header Section */
header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.school-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.school-logo {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-success) 100%);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.school-logo::after {
    content: '';
    position: absolute;
    width: 150%;
    height: 30%;
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(-45deg);
    top: 10%;
    left: -20%;
}

.school-logo svg {
    width: 32px;
    height: 32px;
    fill: #ffffff;
}

.school-title h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 40%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.school-title p {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

.actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Premium Button style */
.btn {
    cursor: pointer;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition-fast);
}

.btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: var(--text-secondary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
    color: white;
    box-shadow: 0 4px 14px 0 rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px 0 rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Main Dashboard Layout */
main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
    padding-bottom: 60px;
}

/* Search Box Container */
.search-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-lg);
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.search-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-success));
}

.search-card h2 {
    font-size: 2.2rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.search-card p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 1.15rem;
}

.search-form {
    display: flex;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.input-group {
    position: relative;
    flex-grow: 1;
}

.input-group svg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    fill: var(--text-muted);
    transition: var(--transition-fast);
}

body:not(.ltr) .input-group svg {
    right: 16px;
}

body.ltr .input-group svg {
    left: 16px;
}

.search-input {
    width: 100%;
    padding: 16px 18px;
    background-color: rgba(11, 15, 25, 0.6);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: white;
    font-family: inherit;
    font-size: 1.25rem;
    transition: var(--transition-fast);
    outline: none;
}

body:not(.ltr) .search-input {
    padding-right: 48px;
}

body.ltr .search-input {
    padding-left: 48px;
}

.search-input:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--border-glow);
    background-color: rgba(11, 15, 25, 0.8);
}

.search-input:focus + svg {
    fill: var(--color-accent);
}

.search-btn {
    padding: 0 28px;
}

/* Error / Info messages */
.message {
    margin-top: 16px;
    font-size: 1.1rem;
    font-weight: 500;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: fadeIn var(--transition-normal);
}

.message.error {
    color: var(--color-danger);
    display: flex;
}

.message.info {
    color: var(--text-secondary);
    display: flex;
}

/* Results Section */
.results-container {
    display: none; /* Hidden by default */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    flex-direction: column;
    gap: 30px;
}

.results-container.show {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

/* Student Profile Card */
.profile-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-md);
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    min-width: 0;
}

.student-main-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.student-badge-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.badge {
    padding: 6px 16px;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-stream {
    background-color: rgba(59, 130, 246, 0.15);
    color: var(--color-accent);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-status-promoted {
    background-color: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status-failed {
    background-color: rgba(239, 68, 68, 0.15);
    color: var(--color-danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.student-name {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: #ffffff;
}

/* Meta grids */
.meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: #ffffff;
}

.meta-label {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* Total circular percentage gauge */
.student-overall {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    padding-right: 30px;
}

body.ltr .student-overall {
    border-right: none;
    border-left: 1px solid var(--border-color);
    padding-right: 0;
    padding-left: 30px;
}

.gauge-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 16px;
}

.gauge-svg {
    transform: rotate(-90deg);
    width: 100%;
    height: 100%;
}

.gauge-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 10;
}

.gauge-progress {
    fill: none;
    stroke: var(--color-success);
    stroke-width: 10;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1s ease-in-out;
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gauge-percent {
    font-size: 2.6rem;
    font-weight: 800;
    color: white;
}

.gauge-total {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: -2px;
}

.overall-status-text {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}

.overall-status-text.promoted {
    color: var(--color-success);
}

.overall-status-text.failed {
    color: var(--color-danger);
}

/* Grades grid layout */
.grades-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    border-bottom: 1.5px solid var(--border-color);
    padding-bottom: 8px;
}

.grades-section-title svg {
    width: 20px;
    height: 20px;
    fill: var(--color-accent);
}

.grades-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    min-width: 0;
}

.academic-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 30px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

/* Custom modern grades table/list */
.grades-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.grade-row {
    display: grid;
    grid-template-columns: 2fr 3fr 1.5fr;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.subject-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.subject-name {
    font-weight: 700;
    font-size: 1.25rem;
    color: white;
}

.subject-type {
    font-size: 0.95rem;
    color: #ffffff;
}

.progress-container {
    height: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 1s cubic-bezier(0.1, 0.8, 0.25, 1);
    background: linear-gradient(90deg, var(--color-accent), #60a5fa);
}

/* Grade statuses colors */
.progress-bar.excellent {
    background: linear-gradient(90deg, #10b981, #34d399);
}
.progress-bar.good {
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
}
.progress-bar.pass {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}
.progress-bar.fail {
    background: linear-gradient(90deg, #ef4444, #f87171);
}

.score-display {
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

body:not(.ltr) .score-display {
    text-align: right;
}

.score-actual {
    font-size: 1.35rem;
    font-weight: 700;
    color: white;
}

.score-actual.excellent { color: #34d399; }
.score-actual.good { color: #60a5fa; }
.score-actual.pass { color: #fbbf24; }
.score-actual.fail { color: #f87171; }

.score-max {
    font-size: 1rem;
    color: var(--text-muted);
}

/* Right sidebar: non-added subjects and control info */
.sidebar-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}

.non-added-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.non-added-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border-color);
}

.non-added-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.non-added-title {
    font-weight: 600;
    font-size: 1.2rem;
}

.non-added-score {
    font-weight: 700;
    font-size: 1.3rem;
}

/* Control signature credits */
.control-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.control-item {
    padding: 10px 14px;
    background-color: rgba(11, 15, 25, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
}

.control-label {
    font-size: 0.95rem;
    color: #ffffff;
    margin-bottom: 2px;
}

.control-name {
    font-weight: 600;
    font-size: 1.15rem;
    color: var(--text-secondary);
}

/* Footer style */
footer {
    padding: 30px 0;
    text-align: center;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    font-size: 1rem;
    margin-top: auto;
}

/* Keyframe animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Overrides */
@media (max-width: 992px) {
    .profile-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .student-badge-row {
        justify-content: center;
    }
    
    .student-overall {
        border-right: none;
        border-left: none;
        border-top: 1px solid var(--border-color);
        padding-top: 24px;
        padding-right: 0;
        padding-left: 0;
    }
    
    body.ltr .student-overall {
        border-left: none;
        padding-left: 0;
    }
    
    .grades-layout {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    main {
        gap: 28px;
        padding-bottom: 40px;
    }

    .search-card h2 {
        font-size: 1.7rem;
    }

    .student-name {
        font-size: 1.9rem;
    }

    .meta-grid {
        gap: 14px;
    }

    .sidebar-layout {
        gap: 20px;
    }
}

@media (max-width: 600px) {
    header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 16px 0;
        margin-bottom: 16px;
    }
    
    .school-info {
        flex-direction: column;
        gap: 10px;
    }

    .school-title h1 {
        font-size: 1.4rem;
    }

    .school-logo {
        width: 48px;
        height: 48px;
    }

    .school-logo svg {
        width: 24px;
        height: 24px;
    }

    .actions {
        gap: 10px;
    }

    .btn {
        padding: 8px 14px;
        font-size: 1rem;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-btn {
        width: 100%;
        padding: 14px;
    }

    .search-card {
        padding: 20px 14px;
    }

    .search-card h2 {
        font-size: 1.55rem;
    }

    .search-card p {
        font-size: 1.05rem;
        margin-bottom: 20px;
    }

    .search-input {
        font-size: 1.2rem;
        padding: 14px 14px 14px 42px;
    }

    body:not(.ltr) .search-input {
        padding-right: 42px;
        padding-left: 14px;
    }

    body.ltr .search-input {
        padding-left: 42px;
        padding-right: 14px;
    }

    .profile-card {
        padding: 20px 16px;
        gap: 16px;
    }

    .student-name {
        font-size: 1.7rem;
        margin-bottom: 14px;
    }

    .student-overall {
        padding-top: 16px;
    }

    .gauge-container {
        width: 160px;
        height: 160px;
    }

    .gauge-percent {
        font-size: 2rem;
    }

    .gauge-total {
        font-size: 0.9rem;
    }

    .meta-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .meta-item {
        gap: 2px;
    }

    .meta-value {
        font-size: 1.1rem;
    }

    .results-container {
        gap: 20px;
    }

    main {
        gap: 24px;
        padding-bottom: 30px;
    }

    .grades-layout {
        gap: 16px;
    }

    .academic-card {
        padding: 20px 14px;
    }

    .sidebar-card {
        padding: 16px 14px;
    }
    
    .grade-row {
        grid-template-columns: 1fr;
        gap: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        padding-bottom: 12px;
    }
    
    .grade-row:last-child {
        border-bottom: none;
    }

    .subject-name {
        font-size: 1.25rem;
    }

    .score-actual {
        font-size: 1.2rem;
    }

    .grades-list {
        gap: 14px;
    }

    .grades-section-title {
        font-size: 1.25rem;
        margin-bottom: 14px;
    }

    .non-added-item {
        padding-bottom: 10px;
    }

    .non-added-title {
        font-size: 1.1rem;
    }

    .control-item {
        padding: 8px 10px;
    }

    .control-name {
        font-size: 1rem;
    }

    .control-grid {
        gap: 10px;
    }
    
    .score-display {
        text-align: right;
    }
    
    body.ltr .score-display {
        text-align: left;
    }

    footer {
        padding: 20px 0;
        font-size: 0.95rem;
    }
}

@media (max-width: 400px) {
    .container {
        padding: 0 12px;
    }

    .search-card {
        padding: 16px 10px;
    }

    .search-card h2 {
        font-size: 1.35rem;
    }

    .profile-card {
        padding: 16px 10px;
    }

    .student-name {
        font-size: 1.5rem;
    }

    .gauge-container {
        width: 140px;
        height: 140px;
    }

    .gauge-percent {
        font-size: 1.7rem;
    }

    .academic-card {
        padding: 16px 10px;
    }

    .sidebar-card {
        padding: 14px 10px;
    }

    .meta-grid {
        gap: 8px;
    }

    .meta-value {
        font-size: 1.05rem;
    }

    .meta-label {
        font-size: 0.9rem;
    }
}

/* Print CSS Stylesheet */
@media print {
    html, body {
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        color: black !important;
        font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
        font-size: 10pt !important;
        direction: rtl !important;
        overflow: hidden !important;
        page-break-inside: avoid !important;
    }
    
    @page {
        size: A4 portrait;
        margin: 8mm 10mm 8mm 10mm;
    }
    
    body.ltr {
        direction: ltr !important;
    }
    
    .container {
        padding: 0 !important;
        max-width: 100% !important;
        height: 100% !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
    }
    
    header, .search-card, footer, .btn, .school-logo, .grades-section-title svg {
        display: none !important;
    }
    
    .results-container {
        display: flex !important;
        opacity: 1 !important;
        transform: none !important;
        flex-direction: column !important;
        gap: 10px !important;
        height: 100% !important;
    }
    
    .profile-card {
        background: none !important;
        border: 1.5px solid #000 !important;
        border-radius: 0 !important;
        padding: 10px 15px !important;
        margin-bottom: 0 !important;
        grid-template-columns: 3fr 1.2fr !important;
        align-items: center !important;
        box-shadow: none !important;
        gap: 15px !important;
    }
    
    .student-main-info {
        justify-content: center !important;
    }
    
    .student-name {
        color: black !important;
        font-size: 1.5rem !important;
        margin-bottom: 8px !important;
    }
    
    .student-badge-row {
        margin-bottom: 6px !important;
    }
    
    .badge {
        padding: 2px 8px !important;
        font-size: 0.7rem !important;
        border: 1px solid #000 !important;
        background: none !important;
        color: black !important;
    }
    
    .meta-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
    }
    
    .meta-item {
        gap: 2px !important;
    }
    
    .meta-value {
        color: black !important;
        font-size: 0.9rem !important;
    }
    
    .meta-label {
        color: #444 !important;
        font-size: 0.75rem !important;
    }
    
    /* Keep Gauge total scores visible in print but hide SVG circles */
    .student-overall {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .gauge-container {
        display: block !important;
        width: auto !important;
        height: auto !important;
        margin-bottom: 2px !important;
    }
    
    .gauge-svg {
        display: none !important;
    }
    
    .gauge-value {
        position: relative !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important;
        text-align: center !important;
    }
    
    .gauge-percent {
        font-size: 1.5rem !important;
        font-weight: 800 !important;
        color: black !important;
    }
    
    .gauge-total {
        font-size: 0.85rem !important;
        color: #333 !important;
    }
    
    .overall-status-text {
        font-size: 1rem !important;
        font-weight: bold !important;
        color: black !important;
        text-align: center !important;
        margin-top: 4px !important;
    }
    
    .overall-status-text.promoted,
    .overall-status-text.failed {
        color: black !important;
    }
    
    .grades-layout {
        display: grid !important;
        grid-template-columns: 1.6fr 1fr !important;
        gap: 12px !important;
    }
    
    .academic-card, .sidebar-card {
        background: none !important;
        border: 1.5px solid #000 !important;
        border-radius: 0 !important;
        padding: 10px 14px !important;
        box-shadow: none !important;
    }
    
    .grades-section-title {
        font-size: 1rem !important;
        margin-bottom: 8px !important;
        padding-bottom: 4px !important;
        border-bottom: 1.5px solid #000 !important;
        color: black !important;
    }
    
    .grades-list {
        gap: 5px !important;
    }
    
    .grade-row {
        grid-template-columns: 2.5fr 1fr !important;
        border-bottom: 1px solid #ccc !important;
        padding-bottom: 3px !important;
        gap: 10px !important;
    }
    
    .subject-info {
        gap: 1px !important;
    }
    
    .subject-name {
        font-size: 0.85rem !important;
        color: black !important;
    }
    
    .subject-type {
        font-size: 0.65rem !important;
        color: #555 !important;
    }
    
    .progress-container {
        display: none !important;
    }
    
    .score-display {
        text-align: left !important;
    }
    
    body:not(.ltr) .score-display {
        text-align: right !important;
    }
    
    .score-actual {
        font-size: 0.95rem !important;
        color: black !important;
        font-weight: 700 !important;
    }
    
    .score-max {
        font-size: 0.75rem !important;
        color: #444 !important;
    }
    
    .non-added-list {
        gap: 5px !important;
    }
    
    .non-added-item {
        border-bottom: 1px solid #ccc !important;
        padding-bottom: 3px !important;
    }
    
    .non-added-title {
        font-size: 0.85rem !important;
        color: black !important;
    }
    
    .non-added-score {
        font-size: 0.95rem !important;
        color: black !important;
        font-weight: 700 !important;
    }
    
    .control-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 8px !important;
        margin-top: 10px !important;
    }
    
    .control-item {
        border: 1px solid #000 !important;
        background: none !important;
        border-radius: 0 !important;
        padding: 4px 6px !important;
    }
    
    .control-label {
        font-size: 0.65rem !important;
        color: #444 !important;
    }
    
    .control-name {
        font-size: 0.75rem !important;
        color: black !important;
    }
    
    /* Print Header (Visible only when printing) */
    .print-header {
        display: block !important;
        text-align: center;
        margin-bottom: 8px;
        border-bottom: 1.5px solid #000;
        padding-bottom: 8px;
    }
    
    .print-header-grid {
        display: grid;
        grid-template-columns: 1fr 1.8fr 1fr;
        align-items: center;
        font-size: 8.5pt;
    }
    
    .print-header-center h2 {
        font-size: 1.25rem;
        margin-bottom: 2px;
        font-weight: 800;
    }
}

/* Print Header element (hidden normally) */
.print-header {
    display: none;
}
