/* T Fabrication Calculator Styles */
:root {
    --tfc-primary-color: #007bff;
    --tfc-secondary-color: #495057;
    --tfc-bg-dark: #343a40;
    --tfc-light-color: #fff;
    --tfc-grey-color: #f8f9fa;
    --tfc-border-color: #dee2e6;
    --tfc-text-color: #212529;
    --tfc-border-radius: 8px;
    --tfc-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.tfc-container {
    max-width: 800px;
    margin: 2rem auto;
    font-family: sans-serif;
}

.tfc-nav-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--tfc-border-color);
    padding-bottom: 1rem;
}

.tfc-nav-tabs .tab-button {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--tfc-border-color);
    background-color: var(--tfc-grey-color);
    color: var(--tfc-primary-color);
    cursor: pointer;
    border-radius: var(--tfc-border-radius) var(--tfc-border-radius) 0 0;
    font-weight: 600;
    transition: all 0.3s ease;
}

.tfc-nav-tabs .tab-button:hover {
    background-color: #e2e6ea;
}

.tfc-nav-tabs .tab-button.active {
    background-color: var(--tfc-primary-color);
    color: var(--tfc-light-color);
    border-color: var(--tfc-primary-color);
}

.tfc-calculator-panel {
    display: none;
}

.tfc-calculator-panel.active {
    display: block;
}

.tfc-card {
    background-color: var(--tfc-light-color);
    border-radius: var(--tfc-border-radius);
    box-shadow: var(--tfc-box-shadow);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.tfc-section-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--tfc-secondary-color);
    font-weight: 600;
}

.tfc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tfc-form-group {
    margin-bottom: 1rem;
}

.tfc-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--tfc-text-color);
}

/* --- KHU VỰC ĐÃ SỬA LỖI --- */
.tfc-input {
    width: 100%;
    min-width: 150px;
    /* Đảm bảo ô nhập liệu không bị quá hẹp */
    padding: 0.75rem;
    border: 1px solid var(--tfc-border-color);
    border-radius: var(--tfc-border-radius);
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    /* Quan trọng để padding không làm tăng kích thước */
}

.tfc-input:focus {
    border-color: var(--tfc-primary-color);
    outline: none;
}

.tfc-button {
    background-color: var(--tfc-primary-color);
    color: var(--tfc-light-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--tfc-border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-top: 1rem;
    font-size: 1rem;
}

.tfc-button:hover {
    background-color: #0056b3;
}

.tfc-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.tfc-hide {
    display: none !important;
}

.tfc-info {
    background-color: var(--tfc-grey-color);
    padding: 1rem;
    border-radius: var(--tfc-border-radius);
    line-height: 1.8;
}

.tfc-info-item {
    margin-bottom: 0.5rem;
}

.tfc-info-label {
    font-weight: 600;
}

.tfc-svg-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--tfc-border-color);
    padding: 1rem;
    border-radius: var(--tfc-border-radius);
    overflow-x: auto;
}

.tfc-svg-measurement {
    font-size: 12px;
    fill: #333;
}

.tfc-svg-dimension-line {
    stroke: #e67e22;
    stroke-width: 1;
    stroke-dasharray: 4 2;
}

.tfc-svg-shape {
    fill: #ecf0f1;
    stroke: #34495e;
    stroke-width: 2;
}

.tfc-table-wrapper {
    overflow-x: auto;
}

.tfc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.tfc-table th,
.tfc-table td {
    border: 1px solid var(--tfc-border-color);
    padding: 0.75rem;
    text-align: left;
}

.tfc-table th {
    background-color: var(--tfc-grey-color);
    font-weight: 600;
}