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

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

/* --- tool: wall-tile-calculator --- */
.wall-tile-calculator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.form-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.form-section h6 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

.btn-calculate {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
    color: white;
}

.btn-clear {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

.btn-clear:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
    color: white;
}

.result-card {
    background: linear-gradient(135deg, #ffffff, #f8f9fa);
    border: none;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.result-card .card-title {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    margin: -20px -20px 20px -20px;
    padding: 20px;
    border-radius: 15px 15px 0 0;
}

.result-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.result-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
    margin-bottom: 5px;
}

.result-value {
    font-size: 18px;
    font-weight: 700;
    color: #007bff;
}

.calculation-details {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.calculation-details h6 {
    color: #495057;
    font-weight: 600;
    margin-bottom: 15px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #495057;
}

.detail-value {
    font-weight: 600;
    color: #007bff;
}

.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.select-tile {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.select-tile:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.alert {
    border-radius: 10px;
    border: none;
    padding: 15px 20px;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 4px solid #ffc107;
}

@media (max-width: 768px) {
    .result-item {
        margin-bottom: 10px;
    }
    
    .btn-calculate, .btn-clear {
        width: 100%;
        margin-bottom: 10px;
    }
}
