/* ============================================
   SGPA CALCULATOR - ADDITIONAL STYLES
   ============================================ */

/* Subject Grid */
.subjects-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.subjects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Subject Card */
.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem;
    position: relative;
    transition: border-color var(--transition-fast), transform var(--transition-fast);
    animation: fadeInUp 300ms ease forwards;
}

.subject-card:hover {
    border-color: var(--border-light);
}

.subject-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.subject-title {
    font-size: 0.9375rem;
    font-weight: 700;
}

/* 3-column grid: Name | Credits | Grade — ALWAYS override .semester-fields */
.subject-card .subject-fields.semester-fields.has-name {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 0.75rem;
}

.btn-remove-subject {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    font-size: 1.125rem;
    line-height: 1;
}

.btn-remove-subject:hover {
    color: var(--error);
    background: rgba(239, 68, 68, 0.1);
}

/* Select Dropdown (Letter Grades) */
.field-select {
    width: 100%;
    padding: 0.625rem 0.75rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2rem;
    cursor: pointer;
}

.field-select:focus {
    outline: none;
    border-color: var(--border-light);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

.field-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 0.9375rem;
    padding: 0.5rem;
}

.field-select.error {
    border-color: var(--error) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* SGPA Meta (Percentage display) */
.sgpa-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.sgpa-percentage {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.sgpa-meta-label {
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 768px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .subject-card .subject-fields.semester-fields.has-name {
        grid-template-columns: 1.5fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .subject-card .subject-fields.semester-fields.has-name {
        grid-template-columns: 2fr 1fr 1fr;
    }
}