/* Base styles */
.container {
    max-width: 1200px;
    padding: 10px;
    margin: 0 auto;
}

/* Card styles */
.card {
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 0.8rem;
    padding: 5px;
}

.card-body {
    padding: 0.8rem;
}

/* Section title */
.section-title {
    color: #2c3e50;
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
    padding-bottom: 0.3rem;
    border-bottom: 1px solid #eee;
}

/* Adjust spacing for table section title */
.section-title.mt-4 {
    margin-top: 1.5rem;
}

.section-title.mb-3 {
    margin-bottom: 1rem;
}

/* Form elements */
.row.mb-3 {
    margin-bottom: 0.4rem !important;
}

.col-form-label {
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    font-size: 1rem;
    white-space: nowrap;
}

.form-control {
    padding: 0.3rem 0.5rem;
    height: calc(1.5em + 0.5rem + 2px);
    font-size: 1rem;
}

/* Range hints */
.range-hint {
    font-size: 0.85rem;
    color: #666;
    margin-top: 1px;
    line-height: 1.2;
    font-style: italic;
}

/* Checkbox group */
.form-check-inline {
    margin-right: 1rem;
    margin-bottom: 0.3rem;
}

.form-check-label {
    font-size: 1rem;
    cursor: pointer;
}

/* Cost displays */
.form-text {
    margin-top: 0.2rem;
    font-size: 1rem;
    color: #495057;
    margin-top: 6px;
    display: inline-block;
}

/* Summary section */
.cost-summary {
    background: #f8f9fa;
}

.summary-item {
    padding: 0.4rem 0.6rem;
    margin-bottom: 0.3rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-item label {
    font-size: 1rem;
    margin-bottom: 0;
}

.summary-item span {
    font-size: 1rem;
    font-weight: 500;
}

.summary-item.total {
    background: #4CAF50;
    padding: 0.6rem;
}

.summary-item.total label,
.summary-item.total span {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Button */
.btn-primary {
    padding: 0.4rem 1.5rem;
    font-size: 1rem;
    min-width: 120px;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 8px;
        width: 100%;
    }
    
    .card-body {
        padding: 0.6rem;
    }
    
    .col-form-label {
        font-size: 1rem;
        padding: 0.2rem 0;
        white-space: normal;
    }

    .form-control {
        width: 100%;
        margin-bottom: 0.2rem;
    }

    .range-hint {
        font-size: 0.9rem;
        display: block;
        margin-bottom: 0.3rem;
    }

    .form-text {
        text-align: right;
        display: block;
        margin-bottom: 0.5rem;
    }

    .summary-item {
        padding: 0.3rem 0.4rem;
    }

    .summary-item label,
    .summary-item span {
        font-size: 1rem;
    }

    .form-check-inline {
        display: inline-block;
        margin-right: 0.8rem;
        margin-bottom: 0.4rem;
    }
}

/* Thêm breakpoint cho màn hình rất nhỏ */
@media (max-width: 576px) {
    .container {
        padding: 5px;
    }

    .row > [class*='col-'] {
        padding-right: 5px;
        padding-left: 5px;
		width: auto;
    }
	.row > label.col-form-label {
		width: 100%;
	}

    .page-title {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .btn-primary {
        width: 100%;
        margin: 0.3rem 0;
    }

    .cost-summary .col-md-6 {
        width: 100%;
    }
}

/* Header styles */
.page-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

/* Button container */
.button-container {
    text-align: center;
    margin: 1rem 0;
}

/* Input group styles */
.input-group-text {
    padding: 0.3rem 0.5rem;
    font-size: 0.9rem;
    background-color: #f8f9fa;
    border-left: none;
    display: flex;
    align-items: center;
    min-width: 35px;
    justify-content: center;
}

.input-group {
    align-items: stretch;
}

.input-group .form-control {
    border-right: none;
    height: auto;
    padding: 0.375rem 0.75rem;
}

.input-group .form-control:focus + .input-group-text {
    border-color: #86b7fe;
}

/* Đảm bảo input và input-group-text có cùng chiều cao */
.input-group > .form-control,
.input-group > .input-group-text {
    height: 38px;
    line-height: 1.5;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .input-group-text {
        padding: 0.2rem 0.4rem;
        font-size: 0.85rem;
    }
    .input-group > .form-control {
    max-width: 160px;
}
    .input-group > .form-control,
    .input-group > .input-group-text {
        min-height: 34px;
    }
}

/* Add these styles */
.table {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table td, .table th {
    padding: 0.5rem;
    vertical-align: middle;
}

.text-end {
    text-align: right;
}

@media (max-width: 576px) {
    .table {
        font-size: 0.9rem;
    }
    
    .table td, .table th {
        padding: 0.4rem;
    }
}

/* Add these styles */
.overview-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem 0.5rem;
}

.overview-item {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-height: 95px;
}

.overview-label {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.overview-value {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .overview-item {
        padding: 0.8rem;
    }
    
    .overview-value {
        font-size: 1rem;
    }
}

/* Add new layout styles */
.layout-wrapper {
    display: flex;
    gap: 20px;
    width: 100%;
}

.column-left {
    flex: 1;
    min-width: 0; /* Prevent flex item from overflowing */
    width: 600px;
}

.column-right {
    width: calc(100% - 600px);
    flex-shrink: 0; /* Prevent column from shrinking */
}

/* Responsive layout */
@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }
    
    .column-right {
        width: 100%;
    }

    .column-left {
        width: 100%;
    }
}

/* Container adjustments */
.container {
    max-width: 1270px;
    padding: 10px;
    margin: 0 auto;
}
