.facture-carcul-container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #B31B1F;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
}

.tabs-container {
    margin-bottom: 30px;
}

.tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #e0e0e0;
    overflow-x: auto;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: #666;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: #B31B1F;
    background: rgba(179, 27, 31, 0.05);
}

.tab-btn.active {
    color: #B31B1F;
    border-bottom-color: #B31B1F;
    font-weight: 600;
}

.tab-btn i {
    font-size: 16px;
}

.tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-placeholder {
    text-align: center;
    padding: 80px 20px;
    color: #999;
}

.content-placeholder i {
    color: #ccc;
    margin-bottom: 20px;
}

.content-placeholder p {
    font-size: 18px;
    margin: 0;
}

.souscription-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.users-block {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 24px;
}

.block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.block-header h2,
.block-header h3 {
    color: #333;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 12px;
    color: #999;
}

.search-box input {
    padding: 10px 12px 10px 36px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    width: 300px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #B31B1F;
    box-shadow: 0 0 0 3px rgba(179, 27, 31, 0.1);
}

.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.loading-spinner i {
    color: #B31B1F;
    margin-bottom: 15px;
}

.loading-spinner p {
    margin: 0;
    font-size: 14px;
}

/*.table-container {
    overflow-x: auto;
}
*/
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: #f8f9fa;
}

.data-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #555;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e0e0e0;
}

.data-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
    cursor: pointer;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table td {
    padding: 16px;
    color: #333;
    font-size: 14px;
}

.data-table .no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-admin {
    background: #e3f2fd;
    color: #1976d2;
}

.badge-user {
    background: #f3e5f5;
    color: #7b1fa2;
}

.btn-icon {
    padding: 8px 12px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #B31B1F;
    color: white;
    border-color: #B31B1F;
}

.btn-check {
    padding: 6px 12px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    color: #856404;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-check:hover {
    background: #ffc107;
    color: white;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 1000px;
    max-height: 85vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    color: #333;
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}

.btn-close {
    padding: 8px;
    background: transparent;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s ease;
    border-radius: 50%;
}

.btn-close:hover {
    background: #f5f5f5;
    color: #333;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.modal-menu {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.menu-item {
    flex: 1;
    padding: 20px;
    background: linear-gradient(135deg, #B31B1F 0%, #8B1518 100%);
    border: none;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(179, 27, 31, 0.2);
}


.menu-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(179, 27, 31, 0.3);
    color: #8B1518;
}

.menu-item.active-menu {
    /* background: linear-gradient(135deg, #8B1518 0%, #B31B1F 100%); */
    border: 2px solid #B31B1F;
    /* color: white; */
}

.menu-item i {
    font-size: 32px;
}

.menu-item span {
    font-size: 16px;
    font-weight: 600;
}

.vehicles-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

/*.table-container {
    overflow: visible !important;
}*/

.action-menu-container {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    min-width: 280px;
    z-index: 100;
    animation: fadeIn 0.2s ease;
}

.dropdown-header {
    padding: 12px 16px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: #333;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px 8px 0 0;
}

.dropdown-item {
    width: 100%;
    padding: 12px 16px;
    background: white;
    border: none;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease;
}

.dropdown-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.dropdown-item:hover {
    background: #f8f9fa;
}

.formula-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.formula-info strong {
    color: #333;
    font-size: 14px;
}

.formula-info .price {
    color: #B31B1F;
    font-weight: 600;
    font-size: 15px;
}

.formula-info .validity {
    color: #666;
    font-size: 12px;
}

.subscription-info {
    padding: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    color: #555;
    font-size: 13px;
}

.info-row span {
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

@media (max-width: 768px) {
    .facture-carcul-container {
        padding: 15px;
    }

    .search-box input {
        width: 100%;
    }

    .block-header {
        flex-direction: column;
        align-items: stretch;
    }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-menu {
        flex-direction: column;
    }

    .table-container {
        overflow-x: auto;
        overflow-y: visible;
    }

    .dropdown-menu {
        right: auto;
        left: 0;
    }

    .dropdown-menu-table {
        min-width: 90vw !important;
        left: 5vw !important;
        right: 5vw !important;
        width: 90vw !important;
    }

    .formule-table {
        font-size: 12px;
    }

    .formule-table td:first-child {
        min-width: 200px;
    }

    .formule-table td:nth-child(2) {
        width: 80px;
    }

    .formule-table td:nth-child(3) {
        width: 120px;
    }

    .formule-input {
        font-size: 12px;
        padding: 6px;
    }

    .formule-cell strong {
        font-size: 12px;
    }

    .formule-details {
        font-size: 11px;
    }

    .confirmation-modal {
        width: 95%;
        max-width: 95%;
    }
}

.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: fadeIn 0.2s ease;
}

.dropdown-menu-table {
    position: fixed;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    min-width: 700px;
    max-width: 850px;
    z-index: 10000;
    animation: fadeIn 0.2s ease;
    border: 2px solid #e0e0e0;
}

.formule-table-container {
    overflow-y: auto;
    overflow-x: hidden;
}

.formule-table {
    width: 100%;
    border-collapse: collapse;
}

.formule-table thead {
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.formule-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: #333;
    font-size: 14px;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}

.formule-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.formule-row {
    cursor: pointer;
}

.formule-row:hover {
    background: #f8f9fa;
}

.formule-table td {
    padding: 14px 16px;
    vertical-align: middle;
}

.formule-table td:first-child {
    min-width: 350px;
}

.formule-table td:nth-child(2) {
    width: 120px;
}

.formule-table td:nth-child(3) {
    width: 180px;
}

.formule-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.formule-cell strong {
    color: #333;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.formule-details {
    color: #B31B1F;
    font-size: 13px;
    font-weight: 500;
}

.formule-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    transition: all 0.2s ease;
}

.formule-input:focus {
    outline: none;
    border-color: #B31B1F;
    box-shadow: 0 0 0 3px rgba(179, 27, 31, 0.1);
}

.formule-input:hover {
    border-color: #B31B1F;
}

.date-input {
    font-family: monospace;
}

.confirmation-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 600px;
    animation: slideUp 0.3s ease;
}

.confirmation-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
}

.detail-section h3 {
    color: #B31B1F;
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e0e0e0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.detail-row:not(:last-child) {
    border-bottom: 1px solid #e0e0e0;
}

.detail-label {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.detail-value {
    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.confirmation-message {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #1976d2;
}

.confirmation-message i {
    color: #1976d2;
    font-size: 24px;
}

.confirmation-message p {
    margin: 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel {
    padding: 10px 24px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-cancel:hover:not(:disabled) {
    background: #e0e0e0;
    color: #333;
}

.btn-cancel:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-confirm {
    padding: 10px 24px;
    background: linear-gradient(135deg, #B31B1F 0%, #8B1518 100%);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(179, 27, 31, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 27, 31, 0.4);
}

.btn-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Factures Section Styles */
.factures-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

.facture-number {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.facture-price {
    font-size: 14px;
    font-weight: 600;
    color: #00A651;
}

.facture-date {
    font-size: 13px;
    color: #666;
}

.facture-time {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.text-muted {
    color: #999;
    font-style: italic;
}

.facture-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.facture-status.status-paid {
    background: rgba(0, 166, 81, 0.1);
    color: #00A651;
}

.facture-status.status-pending {
    background: rgba(255, 193, 7, 0.1);
    color: #FFC107;
}

.facture-status.status-expired {
    background: rgba(179, 27, 31, 0.1);
    color: #B31B1F;
}

@media (max-width: 768px) {
    .factures-section .data-table th,
    .factures-section .data-table td {
        font-size: 12px;
        padding: 10px;
    }

    .facture-number {
        font-size: 11px;
    }

    .facture-price {
        font-size: 12px;
    }

    .facture-date {
        font-size: 11px;
    }

    .facture-time {
        font-size: 10px;
    }
}

/* Facture Details Modal */
.facture-details-modal {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUpModal 0.3s ease;
}

.facture-info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

/*.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}*/

/*.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}*/

.info-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.lignes-section {
    margin-top: 25px;
}

.lignes-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.lignes-section h3 {
    font-size: 18px;
    color: #333;
    margin: 0;
}

.btn-add-ligne {
    background: #B31B1F;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-add-ligne:hover {
    background: #8B1519;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(179, 27, 31, 0.3);
}

.add-ligne-form {
    background: #fff;
    border: 2px solid #B31B1F;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.add-ligne-form h4 {
    font-size: 16px;
    color: #B31B1F;
    margin: 0 0 15px 0;
    font-weight: 600;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 15px;
}

.btn-delete {
    background: #fff;
    color: #B31B1F;
    border: 1px solid #B31B1F;
}

.btn-delete:hover:not(:disabled) {
    background: #B31B1F;
    color: white;
}

.full-width {
    grid-column: 1 / -1;
}

.autocomplete-container {
    position: relative;
}

.dropdown-backdrop-inline {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
}

.vehicle-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: 4px;
}

.vehicle-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s ease;
}

.vehicle-item:hover {
    background: #f8f9fa;
}

.vehicle-item:last-child {
    border-bottom: none;
}

.vehicle-name {
    font-weight: 600;
    color: #333;
    font-size: 14px;
    margin-bottom: 4px;
}

.vehicle-item .vehicle-id {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
}

.selected-vehicle-card {
    margin-top: 12px;
    padding: 12px;
    background: #e3f2fd;
    border-radius: 8px;
    border: 1px solid #1976d2;
}

.vehicle-card-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.vehicle-card-content i {
    font-size: 24px;
    color: #1976d2;
}

.vehicle-card-content strong {
    font-size: 14px;
    color: #333;
}

.vehicle-card-content .vehicle-id {
    font-size: 11px;
    color: #666;
    font-family: 'Courier New', monospace;
}

.subscription-loader {
    text-align: center;
    padding: 20px;
    color: #B31B1F;
    font-size: 14px;
}

.subscription-loader i {
    margin-right: 8px;
}

.subscription-selector,
.auto-selected-subscription {
    margin: 20px 0;
}

.subscription-selector label,
.auto-selected-subscription label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    display: block;
}

.subscription-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.subscription-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.subscription-card:hover:not(.disabled) {
    border-color: #B31B1F;
    box-shadow: 0 2px 8px rgba(179, 27, 31, 0.1);
}

.subscription-card.selected {
    border-color: #B31B1F;
    background: #fff5f5;
    box-shadow: 0 2px 8px rgba(179, 27, 31, 0.2);
}

.subscription-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #f5f5f5;
}

.subscription-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.subscription-formule {
    display: flex;
    align-items: center;
    gap: 10px;
}

.subscription-formule strong {
    font-size: 15px;
    color: #333;
}

.subscription-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.subscription-badge.badge-active {
    background: rgba(0, 166, 81, 0.1);
    color: #00A651;
}

.subscription-badge.badge-inactive {
    background: rgba(158, 158, 158, 0.1);
    color: #9e9e9e;
}

.subscription-check {
    color: #B31B1F;
    font-size: 24px;
}

.subscription-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.detail-item i {
    width: 16px;
    text-align: center;
    color: #B31B1F;
}

.ligne-montant {
    font-weight: 600;
    color: #00A651;
}

.vehicle-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vehicle-info strong {
    font-size: 13px;
    color: #333;
}

.vehicle-id {
    font-size: 11px;
    color: #999;
    font-family: 'Courier New', monospace;
}

.formule-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.formule-info strong {
    font-size: 13px;
    color: #B31B1F;
}

.formule-details {
    font-size: 11px;
    color: #666;
}

.total-row {
    background: #f8f9fa;
    font-weight: 600;
}

.total-row td {
    padding: 15px !important;
    border-top: 2px solid #B31B1F;
}

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

.no-data-card {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.no-data-card i {
    color: #ddd;
    margin-bottom: 15px;
}

.no-data-card p {
    font-size: 14px;
    margin: 0;
}

.edit-button-container {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: right;
}

.btn-edit {
    background: #B31B1F;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-edit:hover {
    background: #8B1519;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(179, 27, 31, 0.3);
}

.facture-edit-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.edit-title {
    font-size: 16px;
    font-weight: 600;
    color: #B31B1F;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-group .required {
    color: #B31B1F;
}

.form-group .form-control {
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
    background: white;
}

.form-group .form-control:focus {
    outline: none;
    border-color: #B31B1F;
    box-shadow: 0 0 0 3px rgba(179, 27, 31, 0.1);
}

.form-group .form-control:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.form-hint {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    font-style: italic;
}

.edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.btn-save {
    background: #00A651;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-save:hover:not(:disabled) {
    background: #008941;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.3);
}

.btn-save:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

@keyframes slideUpModal {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .facture-details-modal {
        width: 95%;
        max-height: 95vh;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .edit-actions {
        flex-direction: column;
    }

    .edit-actions button {
        width: 100%;
        justify-content: center;
    }

    .lignes-section .data-table th,
    .lignes-section .data-table td {
        font-size: 12px;
        padding: 8px;
    }

    .subscription-list {
        gap: 10px;
    }

    .subscription-card {
        padding: 12px;
    }

    .subscription-formule {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .subscription-details {
        gap: 6px;
    }

    .detail-item {
        font-size: 12px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions button {
        width: 100%;
        justify-content: center;
    }
}

.facture-actions-bar {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.action-bar-btn {
    flex: 1;
    padding: 16px 20px;
    background: white;
    border: 2px solid #B31B1F;
    border-radius: 10px;
    color: #B31B1F;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.action-bar-btn:hover:not(:disabled) {
    background: #B31B1F;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(179, 27, 31, 0.3);
}

.action-bar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #ddd;
    color: #999;
}

.action-bar-btn i {
    font-size: 24px;
}

.action-bar-btn span {
    font-size: 13px;
    text-align: center;
}

.create-facture-form {
    background: white;
    border: 2px solid #B31B1F;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 16px rgba(179, 27, 31, 0.15);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.create-facture-form .form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: linear-gradient(135deg, #B31B1F 0%, #8B1518 100%);
    border-radius: 10px 10px 0 0;
    color: white;
}

.create-facture-form .form-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-close-form {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close-form:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.create-facture-form .form-body {
    padding: 24px;
}

.facture-preview {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    border-left: 4px solid #1976d2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.preview-label {
    font-size: 12px;
    font-weight: 600;
    color: #1565c0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.preview-number {
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: 700;
    color: #0d47a1;
    letter-spacing: 1px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.create-facture-form .form-group.full-width {
    width: 100%;
}

.create-facture-form .form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .facture-actions-bar {
        flex-direction: column;
        gap: 10px;
    }

    .action-bar-btn {
        flex-direction: row;
        justify-content: center;
        padding: 12px 16px;
    }

    .action-bar-btn i {
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .preview-number {
        font-size: 16px;
    }

    .create-facture-form .form-footer {
        flex-direction: column;
    }

    .create-facture-form .form-footer button {
        width: 100%;
        justify-content: center;
    }
}
