.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: floor-tile-calculator --- */
.tile-calculator {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.form-section h6 {
    color: #495057;
    margin-bottom: 15px;
    font-weight: 600;
}

.result-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
}

.result-item {
    padding: 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 5px;
}

.result-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 5px;
}

.result-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.btn-calculate {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-clear {
    background: #6c757d;
    border: none;
    color: white;
    padding: 10px 30px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-clear:hover {
    background: #5a6268;
    color: white;
    transform: translateY(-2px);
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.select-tile {
    background: white;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    padding: 0.375rem 0.75rem;
    width: 100%;
}

.select-tile:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.calculation-details {
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-item:last-child {
    border-bottom: none;
    font-weight: bold;
    color: #667eea;
}
