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

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

/* --- tool: brightness-contrast-tool --- */
.hepatitis-calculator { 
    background: #f8f9fa; 
    border-radius: 12px; 
    padding: 2rem; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
}

.hepatitis-result { 
    background: linear-gradient(135deg,#667eea 0%,#764ba2 100%); 
    color: white; 
    border-radius: 12px; 
    padding: 2rem; 
    text-align: center; 
    margin-top: 1.5rem; 
    box-shadow: 0 4px 15px rgba(102,126,234,0.3); 
}

.hepatitis-value { 
    font-size: 2.5rem; 
    font-weight: bold; 
    margin: 0.5rem 0; 
}

.hepatitis-category { 
    font-size: 1.2rem; 
    font-weight: 500; 
    margin-bottom: 0.5rem; 
}

.hepatitis-description { 
    font-size: 0.9rem; 
    opacity: 0.9; 
    text-align: left;
    margin-top: 1rem;
}

.hepatitis-chart { 
    background: white; 
    border-radius: 8px; 
    padding: 1.5rem; 
    margin-top: 1.5rem; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
}

.hepatitis-range { 
    display: flex; 
    align-items: center; 
    padding: 0.75rem; 
    margin: 0.5rem 0; 
    border-radius: 6px; 
    font-weight: 500; 
    border-left: 4px solid;
}

.hepatitis-range.normal { 
    background: #e8f5e8; 
    color: #2e7d32; 
    border-left-color: #2e7d32;
}

.hepatitis-range.carrier { 
    background: #fff3e0; 
    color: #f57c00; 
    border-left-color: #f57c00;
}

.hepatitis-range.infected { 
    background: #ffebee; 
    color: #d32f2f; 
    border-left-color: #d32f2f;
}

.hepatitis-range.immunity { 
    background: #e3f2fd; 
    color: #1976d2; 
    border-left-color: #1976d2;
}

.form-floating { 
    margin-bottom: 1rem; 
}

.form-floating > .form-control { 
    border-radius: 8px; 
    border: 2px solid #e9ecef; 
    transition: border-color 0.15s ease-in-out,box-shadow 0.15s ease-in-out; 
}

.form-floating > .form-control:focus { 
    border-color: #0d6efd; 
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.25); 
}

.btn-calculate { 
    background: linear-gradient(135deg,#0d6efd 0%,#0b5ed7 100%); 
    border: none; 
    border-radius: 8px; 
    padding: 0.75rem 2rem; 
    font-weight: 600; 
    transition: all 0.3s ease; 
}

.btn-calculate:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 12px rgba(13,110,253,0.4); 
}

.btn-reset { 
    background: #6c757d; 
    border: none; 
    border-radius: 8px; 
    padding: 0.75rem 2rem; 
    font-weight: 600; 
    transition: all 0.3s ease; 
}

.btn-reset:hover { 
    background: #5a6268; 
    transform: translateY(-2px); 
}

.test-item {
    background: white;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.test-item h6 {
    color: #495057;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.test-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.test-option {
    flex: 1;
    min-width: 120px;
}

.test-option input[type="radio"] {
    margin-right: 0.5rem;
}

.test-option label {
    font-weight: 500;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.test-option label:hover {
    background-color: #f8f9fa;
}

.test-option input[type="radio"]:checked + label {
    background-color: #e3f2fd;
    color: #1976d2;
}

@media (max-width: 768px) { 
    .hepatitis-calculator { padding: 1rem; } 
    .hepatitis-value { font-size: 2rem; } 
    .test-options { flex-direction: column; }
    .test-option { min-width: auto; }
}
