
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #e9edf1; /* Lighter, cooler gray for professionalism */
    color: #2c3e50; /* Darker text for formality */
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    
    background-image: url('data:image/svg+xml;utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Crect x="0" y="0" width="100" height="100" fill="%23e9edf1"/%3E%3Cline x1="0" y1="0" x2="100" y2="100" stroke="%23d5dce3" stroke-width="1.5"/%3E%3C/svg%3E');
    background-size: 200px 200px;
}

.back-button {
    /* 2. Positioning */
    position: absolute;
    bottom: 15px;
    left: 15px;
    z-index: 10;

    /* 3. Styling */
    background: none;
    border: none;
    color: #2c3e50; /* Dark text for formality */
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    padding: 0 10px 10px 8px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.back-button:hover {
    background-color: rgba(0, 86, 179, 0.05); /* Very subtle hover */
    text-decoration: none; /* Keep professional, no underline on hover */
}

.back-button-icon {
    margin-right: 5px;
    font-size: 1.2em;
}

.container {
    background-color: #fff;
    padding: 40px;
    border-radius: 6px; /* Slightly sharper corners */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15); /* Stronger, defined shadow */
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    border-top: 5px solid #0056b3; /* Professional accent color */
    transition: none;
}
.container:hover {
    transform: none; /* Remove subtle lift */
}

h1, h3 {
    color: #003366; /* Deep Corporate Blue for brand emphasis */
    margin-bottom: 20px;
    font-weight: 700;
}
h1 {
    font-size: 2.5em; /* Bold presence */
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 10px;
}

h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 25px;
    font-weight: 500;
}

/* Form Elements */
label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4a5568;
    text-align: left;
}

input[type="text"] {
    width: 100%;
    padding: 14px; /* Slightly larger padding */
    margin: 8px 0 20px 0;
    box-sizing: border-box;
    border: 1px solid #c9d2d9;
    border-radius: 4px; /* Sharper corners */
    transition: border-color 0.3s;
    font-size: 16px;
}

input[type="text"]:focus {
    border-color: #0056b3; /* Corporate blue focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

input[type="password"] {
    width: 100%;
    padding: 14px; /* Slightly larger padding */
    margin: 8px 0 20px 0;
    box-sizing: border-box;
    border: 1px solid #c9d2d9;
    border-radius: 4px; /* Sharper corners */
    transition: border-color 0.3s;
    font-size: 16px;
}

input[type="password"]:focus {
    border-color: #0056b3; /* Corporate blue focus */
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.2);
}

button {
    display: block;
    width: 100%;
    padding: 16px;
    background-color: #0056b3; /* Darker, authoritative blue */
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.1em;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 25px;
}
button:hover {
    background-color: #003366; /* Even deeper blue on hover */
}

#result {
    margin-top: 25px;
    padding: 0 15px 15px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    min-height: 60px;
    background-color: #fafafa;
    line-height: 1.5;
    transition: all 0.3s ease;
}

#result strong {
    color: #2c3e50;
}

.error {
    color: #c0392b; /* A reserved, formal red */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.success {
    color: #27ae60; /* A formal green */
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
.grade-highlight {
    font-size: 1.8em;
    font-weight: 800;
    color: #0056b3; /* Corporate blue highlight */
    display: block;
    margin-top: 5px;
}

.loading {
    color: #0056b3;
    font-style: italic;
}

@media (max-width: 650px) {
    body {
        padding-left: 20px;
        padding-right: 20px;
        align-items: center;
    }
    .container {
        max-width: 95%;
        padding: 20px;
        border-top: 3px solid #0056b3; /* Adjusted border thickness */
    }
    .grade-highlight {
        font-size: 1.5em;
    }
    .back-button {
        bottom: 5px;
        left: 5px;
        padding:0 10px 10px 8px;
    }
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
}

.grades-table th, .grades-table td {
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    text-align: left;
}

.grades-table th {
    background-color: #f7f9fc;
    font-weight: 600;
}

.grades-table tbody tr:hover {
    background-color: #f0f5fa; /* Reserved light blue hover */
}

.grades-table tfoot td {
    border-top: 3px solid #0056b3; /* Use corporate blue */
    background-color: #e6f7ff;
    font-size: 1.1em;
}
.logo-placeholder {
    font-size: 3em;
    color: #0056b3;
    margin-bottom: 15px;
}
.tagline {
    color: #7f8c8d;
    font-size: 0.9em;
    margin-bottom: 25px;
}
.error-message { 
    color: #d9534f; /* A common color for errors (reddish) */
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    display: none; /* Hidden by default */
}