﻿#collapse-0 {
    display: block !important;
}

.select2-container--default .select2-selection--single {
    height: 36px;
}

#detailModal .modal-dialog {
    position: fixed;
    right: 0;
    margin: 0;
    height: 100%;
    /* max-width: 500px; */
    transform: translateX(100%);
    transition: transform 0.3s ease-out;
}

#detailModal.show .modal-dialog {
    transform: translateX(0);
}

#detailModal .modal-content {
    border-radius: 0;
    border: none;
    height: 100%;
}

#detailModal .modal-body {
    overflow-y: auto;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: none !important;
}

.select2-container--default .select2-selection--multiple .select2-selection__rendered li {
    text-transform: lowercase;
}

h2 {
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.panel {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.panel-heading {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 20px;
    border: none;
    transition: all 0.3s ease;
}

    .panel-heading:hover {
        background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%) !important;
        transform: translateY(-1px);
    }

.panel-body {
    padding: 0;
    background: white;
}

.table {
    margin-bottom: 0;
    font-size: 14px;
    background: white;
}

    .table th {
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        border: 1px solid #dee2e6;
        padding: 6px 6px;
        text-align: center;
        font-weight: 600;
        white-space: nowrap;
        color: #495057;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .table td {
        border: 1px solid #e9ecef;
        padding: 8px 6px;
        text-align: center;
        white-space: nowrap;
        cursor: pointer;
        position: relative;
        transition: all 0.2s ease;
        vertical-align: middle;
        font-size: 14px;
    }

        .table td:hover {
            background-color: #e3f2fd;
            transform: scale(1.02);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

.customer-group {
    background: linear-gradient(135deg, #e8f4fd 0%, #f0f8ff 100%);
    font-weight: 600;
    color: #2c3e50;
}

.summary-row {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%) !important;
    font-weight: bold;
    color: #856404;
}

    .summary-row td {
        border-top: 2px solid #ffc107;
        font-weight: 600;
    }

.day-summary-row {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%) !important;
    font-weight: bold;
    color: #0c5460;
}

    .day-summary-row td {
        border-top: 3px solid #17a2b8;
        font-weight: 700;
        font-size: 12px;
    }

.collapse-icon {
    margin-right: 10px;
    transition: transform 0.3s ease;
}

.collapsed .collapse-icon {
    transform: rotate(-90deg);
}

.day-summary {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-left: 15px;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

    .loading .glyphicon-refresh {
        font-size: 24px;
        margin-right: 10px;
    }

.error {
    color: #721c24;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border: 1px solid #f5c6cb;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.success {
    color: #155724;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.numeric-field {
    font-weight: 600;
    color: #007bff;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(0,0,0,0.02);
}

.table tbody tr:hover {
    background-color: rgba(0,123,255,0.05);
}

.table {
    width: 100%;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
}

.inline-input-group {
    display: flex;
    align-items: center;
    gap: 3px;
}

    .inline-input-group input {
        width: 50px;
        font-size: 12px;
        padding: 1px 3px;
        border: 1px solid #ccc;
        border-radius: 2px;
    }

.save-icon {
    cursor: pointer;
    font-size: 16px;
    color: green;
    margin-left: 5px;
}

    .save-icon:hover {
        color: darkgreen;
    }

/* Styles cho chức năng edit */
.editable-cell {
    cursor: pointer;
    transition: background-color 0.2s;
}

    .editable-cell:hover {
        background-color: #e3f2fd !important;
    }

.editable-cell2 {
    cursor: pointer;
    transition: background-color 0.2s;
}

    .editable-cell2:hover {
        background-color: #e3f2fd !important;
    }

.editing {
    background-color: #fff3cd !important;
}

.edit-input {
    width: 100%;
    border: none;
    background: transparent;
    font-size: inherit;
    text-align: inherit;
    padding: 2px;
    outline: none;
    box-shadow: 0 0 3px rgba(0,123,255,0.5);
}

.save-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    color: #28a745;
    font-size: 10px;
}

/*Form nhập sổ điều xe*/
.form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.form-body {
    padding: 20px;
}

.basic-section {
    padding: 15px;
    background-color: #d4edda;
    border-radius: 10px;
    margin-bottom: 15px;
}

.expand-toggle {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 10px;
    width: 100%;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .expand-toggle:hover {
        background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
        transform: translateY(-2px);
    }

.expand-icon {
    transition: transform 0.3s ease;
}

.expand-toggle.collapsed .expand-icon {
    transform: rotate(-90deg);
}

.sodieuxe-expand {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-bottom: 15px;
}

.flex-item-between {
    display: flex;
    gap: 15px;
}

.w-50 {
    flex: 1;
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 10px 12px;
}

    .form-control:focus, .form-select:focus {
        border-color: #1e3c72;
        box-shadow: 0 0 0 0.2rem rgba(30, 60, 114, 0.25);
    }

.btn-primary {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    border: none;
    transition: all 0.3s ease;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, #2a5298 0%, #3f51b5 100%);
        transform: translateY(-2px);
    }

.input-group .form-control,
.input-group .form-select {
    border-radius: 8px;
}

    .input-group .form-control:not(:last-child) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }

    .input-group .form-select:not(:first-child) {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
    }

/* Responsive */
@media (max-width: 768px) {
    .table {
        font-size: 10px;
    }

        .table th, .table td {
            padding: 4px 2px;
        }

    .container-fluid {
        padding: 10px;
    }

    #ttpp-select {
        height: 80px;
    }

    .form-body {
        padding: 15px;
    }
}
