.tool-fullwidth {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Tool shell */
.academic-tool {
    max-width: 100%;
    margin: 0 auto;
}

.academic-tool.editor-section,
.editor-section.academic-tool {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.academic-tool .card:not(.result-card) {
    border: 1px solid var(--color-border, #e5e7eb);
    box-shadow: var(--shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.06));
    border-radius: var(--radius, 12px);
    background: var(--color-surface, #fff);
}

.academic-tool .card-body {
    padding: 1.25rem 1.35rem;
}

.academic-tool .card-title {
    color: var(--color-text, #1f2937);
    font-weight: 700;
    font-size: 1.05rem;
}

.academic-tool .form-control,
.academic-tool .form-select,
.academic-tool .select-input,
.academic-tool textarea {
    border-radius: 8px;
    border: 1px solid var(--color-border, #e5e7eb);
}

.academic-tool .form-control:focus,
.academic-tool .form-select:focus,
.academic-tool textarea:focus {
    border-color: var(--color-primary, #0d9488);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.academic-tool .btn-primary {
    background: var(--color-primary, #0d9488);
    border-color: var(--color-primary, #0d9488);
}

.academic-tool .btn-primary:hover {
    background: var(--color-primary-hover, #0f766e);
    border-color: var(--color-primary-hover, #0f766e);
}

.academic-tool .alert {
    border-radius: 10px;
}

[data-theme="dark"] .academic-tool .card:not(.result-card) {
    background: var(--color-surface, #1f2937);
    border-color: var(--color-border, #374151);
}

[data-theme="dark"] .academic-tool .card-title,
[data-theme="dark"] .academic-tool .form-label,
[data-theme="dark"] .academic-tool {
    color: var(--color-text, #f9fafb);
}

[data-theme="dark"] .academic-tool .text-muted,
[data-theme="dark"] .academic-tool .form-text {
    color: var(--color-text-secondary, #9ca3af) !important;
}

[data-theme="dark"] .academic-tool .form-control,
[data-theme="dark"] .academic-tool .form-select,
[data-theme="dark"] .academic-tool textarea {
    background: #111827;
    color: var(--color-text, #f9fafb);
    border-color: var(--color-border, #374151);
}

/* --- tool: quadratic-equation-calculator --- */
.quadratic-calculator {
    padding: 2rem 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: auto;
}

.calculator-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

.calculator-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.calculator-header h1 {
    margin: 0;
    font-weight: 600;
}

.calculator-body {
    padding: 2rem;
}

.equation-display {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
}

.equation-formula {
    font-size: 2rem;
    font-weight: 600;
    color: #495057;
}

.coefficient {
    color: #007bff;
    font-weight: 700;
}

.coefficient-inputs {
    margin-bottom: 2rem;
}

.coefficient-group {
    text-align: center;
    margin-bottom: 1rem;
}

.coefficient-label {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.coefficient-input {
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.coefficient-input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

.input-group-append {
    display: flex;
    flex-direction: column;
}

.increment-btn, .decrement-btn {
    border: none;
    background: #f8f9fa;
    color: #495057;
    padding: 0.25rem 0.5rem;
    border-radius: 0;
    transition: all 0.3s ease;
}

.increment-btn:hover, .decrement-btn:hover {
    background: #007bff;
    color: white;
}

.increment-btn {
    border-top-right-radius: 8px;
}

.decrement-btn {
    border-bottom-right-radius: 8px;
}

.result-section {
    margin-top: 2rem;
}

.result-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
    border-left: 4px solid #007bff;
}

.discriminant-info {
    margin: 1rem 0;
    text-align: center;
}

.solutions {
    margin: 1.5rem 0;
}

.solution-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    border-left: 4px solid #28a745;
}

.solution-item.complex {
    border-left-color: #ffc107;
}

.solution-item.no-solution {
    border-left-color: #dc3545;
}

.solution-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #495057;
}

.solution-type {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.25rem;
}

.equation-graph {
    margin-top: 1.5rem;
    text-align: center;
}

.examples-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.steps-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.step-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin: 0.5rem 0;
    border-left: 4px solid #17a2b8;
}

.step-number {
    font-weight: 600;
    color: #17a2b8;
    margin-right: 0.5rem;
}

@media (max-width: 768px) {
    .equation-formula {
        font-size: 1.5rem;
    }
    
    .coefficient-inputs .row {
        margin: 0;
    }
    
    .coefficient-inputs .col-md-4 {
        padding: 0 0.5rem;
    }
}
