/* ===== BASE STYLES ===== */
.grade-calculator-v2 {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.calculator-header {
    text-align: center;
    margin-bottom: 40px;
}

.calculator-header h1 {
    color: #1a202c;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.calculator-header .subtitle {
    color: #718096;
    font-size: 1.2rem;
    line-height: 1.6;
}

.calculator-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    margin-bottom: 40px;
}

/* ===== UNIVERSAL CALCULATOR STYLES ===== */
.input-methods {
    margin-bottom: 30px;
}

.method-tabs {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.method-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
}

.method-tab.active {
    background: white;
    color: #3182ce;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.method-content {
    display: none;
}

.method-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
}

.grades-textarea {
    width: 100%;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.grades-textarea:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.input-hint {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 8px;
}

.subjects-input {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.subjects-header {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 16px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
}

.subject-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.subject-row:last-child {
    border-bottom: none;
}

.subject-name {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.subject-name:focus {
    outline: none;
    border-color: #3182ce;
}

.grade-select {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: white;
    font-size: 14px;
    min-width: 60px;
}

.remove-subject {
    background: #fed7d7;
    color: #c53030;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.remove-subject:hover {
    background: #feb2b2;
}

.add-subject-btn {
    width: 100%;
    padding: 12px;
    background: #f7fafc;
    color: #718096;
    border: 2px dashed #cbd5e0;
    border-radius: 0 0 10px 10px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-subject-btn:hover {
    background: #edf2f7;
    border-color: #a0aec0;
}

/* ===== ATTESTAT CALCULATOR SPECIFIC STYLES ===== */
.class-selection {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.class-label {
    display: block;
    margin-bottom: 15px;
    font-weight: 600;
    color: #374151;
}

.class-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.class-option input {
    display: none;
}

.option-card {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.class-option input:checked + .option-card {
    border-color: #3182ce;
    background: #ebf8ff;
}

.option-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.option-text {
    display: flex;
    flex-direction: column;
}

.option-text strong {
    color: #374151;
    font-weight: 600;
}

.option-text span {
    color: #6b7280;
    font-size: 0.875rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    margin: 0;
    color: #374151;
}

.subjects-list {
    margin-bottom: 20px;
}

.subject-input-group {
    display: flex;
    flex: 1;
    gap: 12px;
}

.subjects-summary {
    display: flex;
    gap: 20px;
    padding: 16px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.certificate-results {
    text-align: center;
}

.main-result {
    margin-bottom: 30px;
}

.result-badge {
    display: inline-block;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.result-badge .result-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 8px;
}

.result-badge .result-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.result-badge .result-hint {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.detailed-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.admission-info {
    margin-top: 30px;
}

.opportunity-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.opportunity-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.opportunity-card.excellent {
    border-color: #10b981;
    background: #f0fdf4;
}

.opportunity-card.good {
    border-color: #f59e0b;
    background: #fffbeb;
}

.opportunity-card.satisfactory {
    border-color: #f97316;
    background: #fff7ed;
}

.opportunity-card.poor {
    border-color: #ef4444;
    background: #fef2f2;
}

.opportunity-icon {
    font-size: 2rem;
    margin-right: 16px;
}

.opportunity-content h5 {
    margin: 0 0 4px 0;
    color: #374151;
}

.opportunity-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===== GPA CALCULATOR SPECIFIC STYLES ===== */
.system-selection {
    margin-bottom: 30px;
}

.system-tabs {
    display: flex;
    background: #f7fafc;
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 20px;
}

.system-tab {
    flex: 1;
    padding: 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.system-tab.active {
    background: white;
    color: #3182ce;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.system-content {
    display: none;
}

.system-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.section-actions {
    display: flex;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 2px solid #3182ce;
    border-radius: 6px;
    background: white;
    color: #3182ce;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #3182ce;
    color: white;
}

.action-btn.secondary {
    border-color: #e2e8f0;
    color: #718096;
}

.action-btn.secondary:hover {
    background: #f7fafc;
    color: #4a5568;
}

.courses-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
}

.table-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    padding: 16px;
    background: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #4a5568;
}

.course-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.course-row:last-child {
    border-bottom: none;
}

.course-name, .course-grade, .course-credits, .course-type {
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
    background: white;
}

.course-name:focus, .course-credits:focus {
    outline: none;
    border-color: #3182ce;
}

.remove-course {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-course:hover {
    background: #fecaca;
}

.courses-summary {
    padding: 20px;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #d1fae5;
}

.gpa-results {
    text-align: center;
}

.gpa-main {
    margin-bottom: 30px;
}

.gpa-badge {
    display: inline-block;
    padding: 30px 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.gpa-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    margin-bottom: 8px;
}

.gpa-value {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.gpa-scale {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.gpa-details {
    margin-bottom: 30px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

.detail-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.detail-icon {
    font-size: 2rem;
    margin-right: 16px;
}

.detail-info {
    text-align: left;
}

.detail-label {
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.detail-value {
    color: #374151;
    font-size: 1.5rem;
    font-weight: 700;
}

.gpa-interpretation {
    margin-top: 30px;
}

.interpretation-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.interpretation-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-header h5 {
    margin: 0;
    color: #374151;
}

.card-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.card-badge.excellent {
    background: #d1fae5;
    color: #065f46;
}

.card-badge.good {
    background: #fef3c7;
    color: #92400e;
}

.card-badge.satisfactory {
    background: #fed7aa;
    color: #9a3412;
}

.card-badge.poor {
    background: #fecaca;
    color: #991b1b;
}

.interpretation-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

.scale-info {
    margin-top: 40px;
}

.scale-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 20px;
}

.scale-header {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1px;
    background: #f7fafc;
}

.scale-header span {
    padding: 16px;
    font-weight: 600;
    color: #4a5568;
    text-align: center;
}

.scale-row {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr 1fr;
    gap: 1px;
    border-bottom: 1px solid #f1f5f9;
}

.scale-row:last-child {
    border-bottom: none;
}

.scale-row span {
    padding: 16px;
    text-align: center;
    font-weight: 500;
}

.scale-row.excellent {
    background: #f0fdf4;
}

.scale-row.good {
    background: #fffbeb;
}

.scale-row.satisfactory {
    background: #fff7ed;
}

.scale-row.fail {
    background: #fef2f2;
}

/* ===== TEACHER CALCULATOR SPECIFIC STYLES ===== */
.class-setup {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
}

.setup-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.setup-item {
    display: flex;
    flex-direction: column;
}

.setup-item label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.setup-item input {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
}

.setup-item input:focus {
    outline: none;
    border-color: #3182ce;
}

.grades-table-section {
    margin-bottom: 30px;
}

.table-container {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.grades-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.grades-table th {
    background: #f7fafc;
    padding: 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e2e8f0;
}

.grades-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.grades-table tr:last-child td {
    border-bottom: none;
}

.student-grades-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.student-grades-input:focus {
    outline: none;
    border-color: #3182ce;
}

.class-statistics {
    margin-bottom: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.stat-label {
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.stat-value {
    color: #1e293b;
    font-size: 1.5rem;
    font-weight: 700;
}

.grade-distribution {
    margin-top: 30px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.grade-label {
    min-width: 120px;
    color: #374151;
    font-weight: 500;
}

.distribution-bar {
    flex: 1;
    height: 24px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.8s ease;
}

.bar-fill.excellent { background: linear-gradient(90deg, #48bb78, #38a169); }
.bar-fill.good { background: linear-gradient(90deg, #68d391, #48bb78); }
.bar-fill.satisfactory { background: linear-gradient(90deg, #f6ad55, #ed8936); }
.bar-fill.fail { background: linear-gradient(90deg, #fc8181, #f56565); }

.grade-count {
    min-width: 40px;
    text-align: right;
    color: #64748b;
    font-weight: 600;
}

/* ===== COMMON COMPONENTS ===== */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, #3182ce, #2c5aa0);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.calculate-btn:hover {
    background: linear-gradient(135deg, #2c5aa0, #234b8c);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.3);
}

.export-btn {
    background: #10b981;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.export-btn:hover {
    background: #059669;
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 25px 0;
}

.results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f1f5f9;
    display: none;
}

.results-section.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.results-section h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}

.result-card {
    display: flex;
    align-items: center;
    padding: 20px;
    border-radius: 12px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.result-card.primary {
    border-left: 4px solid #3182ce;
}

.result-card.success {
    border-left: 4px solid #38a169;
}

.result-card.warning {
    border-left: 4px solid #d69e2e;
}

.result-icon {
    font-size: 2rem;
    margin-right: 16px;
}

.result-info {
    flex: 1;
}

.result-label {
    color: #718096;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 4px;
}

.result-value {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
}

.distribution-section {
    margin-top: 30px;
}

.distribution-section h4 {
    color: #4a5568;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.distribution-bars {
    margin-top: 20px;
}

/* ===== INFO COMPONENTS ===== */
.info-banner {
    display: flex;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 30px;
    border: 1px solid;
}

.info-banner.success {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.info-banner.info {
    background: #eff6ff;
    border-color: #bfdbfe;
}

.banner-icon {
    font-size: 1.5rem;
    margin-right: 12px;
}

.banner-content strong {
    display: block;
    margin-bottom: 4px;
    color: #065f46;
}

.banner-content p {
    margin: 0;
    color: #047857;
    font-size: 0.9rem;
}

.info-banner.info .banner-content strong {
    color: #1e40af;
}

.info-banner.info .banner-content p {
    color: #3730a3;
}

.info-section {
    margin: 40px 0;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.info-card h4 {
    margin: 0 0 12px 0;
    color: #374151;
}

.info-card p {
    margin: 0;
    color: #6b7280;
    line-height: 1.6;
}

/* ===== NAVIGATION COMPONENTS ===== */
.quick-actions {
    margin-top: 40px;
}

.quick-actions h3 {
    color: #2d3748;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3182ce;
}

.action-icon {
    font-size: 2.5rem;
    margin-right: 16px;
}

.action-content {
    flex: 1;
}

.action-content h4 {
    color: #2d3748;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.action-content p {
    color: #718096;
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.action-arrow {
    color: #cbd5e0;
    font-size: 1.2rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.action-card:hover .action-arrow {
    color: #3182ce;
    transform: translateX(4px);
}

.navigation-section {
    margin-top: 40px;
}

.nav-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.nav-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.nav-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    border-color: #3182ce;
}

.nav-icon {
    font-size: 2rem;
    margin-right: 16px;
}

.nav-content h4 {
    margin: 0 0 4px 0;
    color: #374151;
}

.nav-content p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.navigation-links {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.nav-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #f8fafc;
    border-color: #3b82f6;
}

/* ===== MODAL COMPONENTS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    color: #374151;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 24px;
}

.sample-options {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.sample-option {
    padding: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sample-option:hover {
    border-color: #3182ce;
    background: #ebf8ff;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .grade-calculator-v2 {
        padding: 16px;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-card {
        padding: 20px;
        border-radius: 16px;
    }
    
    .method-tabs {
        flex-direction: column;
    }
    
    .system-tabs {
        flex-direction: column;
    }
    
    .section-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .section-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .action-btn {
        justify-content: center;
    }
    
    .subject-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .course-row {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        margin-bottom: 8px;
    }
    
    .course-row:last-child {
        margin-bottom: 0;
    }
    
    .table-header {
        display: none;
    }
    
    .subjects-header {
        display: none;
    }
    
    .subject-input-group {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .detailed-results {
        grid-template-columns: 1fr;
    }
    
    .gpa-badge {
        padding: 20px;
    }
    
    .gpa-value {
        font-size: 2.5rem;
    }
    
    .result-badge {
        padding: 20px;
    }
    
    .result-badge .result-value {
        font-size: 2.5rem;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
    
    .interpretation-cards {
        grid-template-columns: 1fr;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
    }
    
    .nav-cards {
        grid-template-columns: 1fr;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .class-options {
        grid-template-columns: 1fr;
    }
    
    .setup-row {
        grid-template-columns: 1fr;
    }
    
    .opportunity-cards {
        grid-template-columns: 1fr;
    }
    
    .distribution-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .grade-label {
        min-width: auto;
    }
    
    .distribution-bar {
        width: 100%;
    }
    
    .scale-header, .scale-row {
        grid-template-columns: 1fr;
    }
    
    .scale-header span, .scale-row span {
        text-align: left;
        padding: 12px;
    }
    
    .navigation-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .action-card {
        flex-direction: column;
        text-align: center;
    }
    
    .action-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
    
    .nav-card {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-icon {
        margin-right: 0;
        margin-bottom: 12px;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .calculator-card {
        border: 2px solid #000;
    }
    
    .result-card {
        border: 1px solid #000;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .calculate-btn,
    .action-btn,
    .nav-cards,
    .info-banner,
    .method-tabs,
    .system-tabs {
        display: none !important;
    }
    
    .results-section {
        display: block !important;
    }
    
    .calculator-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .grade-calculator-v2 {
        max-width: none;
        padding: 0;
    }
    
    /* ===== TEACHER CALCULATOR ENHANCEMENTS ===== */
.table-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: #6b7280;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.excellent { background: #10b981; }
.legend-color.good { background: #f59e0b; }
.legend-color.satisfactory { background: #f97316; }
.legend-color.poor { background: #ef4444; }

.grades-preview {
    font-size: 0.75rem;
    color: #6b7280;
    margin-top: 4px;
    display: none;
}

.grades-preview.show {
    display: block;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
    min-width: 40px;
}

.status-badge.excellent {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.good {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.satisfactory {
    background: #fed7aa;
    color: #9a3412;
}

.status-badge.poor {
    background: #fecaca;
    color: #991b1b;
}

.performance-list {
    margin-top: 30px;
}

.performance-table {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 16px;
}

.performance-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1px;
    background: #f7fafc;
    padding: 16px;
    font-weight: 600;
    color: #374151;
}

.performance-body {
    max-height: 300px;
    overflow-y: auto;
}

.performance-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    align-items: center;
}

.performance-row:last-child {
    border-bottom: none;
}

.performance-row .status {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

.performance-row .status.excellent {
    background: #d1fae5;
    color: #065f46;
}

.performance-row .status.good {
    background: #fef3c7;
    color: #92400e;
}

.performance-row .status.satisfactory {
    background: #fed7aa;
    color: #9a3412;
}

.performance-row .status.poor {
    background: #fecaca;
    color: #991b1b;
}

.quick-guide {
    margin: 40px 0;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.guide-step {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
}

.step-number {
    width: 32px;
    height: 32px;
    background: #3182ce;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 8px 0;
    color: #374151;
    font-size: 1.1rem;
}

.step-content p {
    margin: 0;
    color: #6b7280;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Enhanced table styles for teacher calculator */
.student-name, .student-grades {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.student-name:focus, .student-grades:focus {
    outline: none;
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.1);
}

.student-average {
    font-weight: 600;
    color: #374151;
}
}