:root {
    --primary-color: #3498db;
    --danger-color: #e74c3c;
    --success-color: #27ae60;
    --text-color: #2c3e50;
    --light-gray: #f8f9fa;
    --border-color: #e3e8f0;
    --card-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

header {
    background: #3498db;
    color: white;
    padding: 20px;
    text-align: center;
}

h1 {
    font-size: 24px;
    margin-bottom: 5px;
}

.card {
    padding: 25px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
}

select, input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

select:focus, input:focus, textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

button {
    background: #3498db;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 10px;
}

button:hover {
    background: #2980b9;
}

.duration {
    margin-top: 15px;
    padding: 15px;
    background: #ecf0f1;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    display: none;
}

.message {
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    display: none;
}

.error {
    background: #ffecec;
    color: #e74c3c;
    border: 1px solid #f5b7b1;
}

.success {
    background: #eafaf1;
    color: #27ae60;
    border: 1px solid #a9dfbf;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 25px;
}

.links a {
    color: #3498db;
    text-decoration: none;
    display: flex;
    align-items: center;
    font-weight: 500;
}

.links a:hover {
    text-decoration: underline;
}

.icon {
    margin-right: 10px;
    font-size: 18px;
}

.amount-info {
    margin-top: 13px;
    padding: 15px;
    background: #e8f4fc;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #2c3e50;
    display: none;
}

/* Date Range Group */
.input-daterange {
    display: flex;
    align-items: center;
    border: 1px solid #dce1e6;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    height: 48px; /* set overall height */
    margin-bottom: 16px;
}

.input-daterange .input-group-text {
    font-size: 14px;
    font-weight: 500;
    color: #555;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    height: 46px;
    display: flex;
    align-items: center;
}

.datepicker-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    height: 46px;
}

/* Styles pour le groupe période de travail */
.work-period-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.work-period-row {
    display: flex;
    gap: 15px;
    width: 100%;
}

.date-range-container {
    display: flex;
    flex: 2;
    align-items: flex-end;
    gap: 8px;
}


/* Ajustement de l'alignement des champs heure */
.time-range-container {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    margin-top: 0;
    flex: 1;
}

.time-input-group {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
}

.time-input-group label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.time-input {
    height: 46px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    text-align: center;
    font-family: monospace;
}

/* Styles responsives */
@media (max-width: 768px) {
    .work-period-row {
        flex-direction: column;
    }

    .date-range-container,
    .time-range-container {
        width: 100%;
    }

    .time-range-container {
        margin-top: 15px;
    }
}

/* Ajustements pour les petits écrans */
@media (max-width: 600px) {
    .input-daterange {
        flex-wrap: wrap;
    }

    .input-daterange .input-group-text {
        flex: 0 0 calc(15% - 8px);
        text-align: center;
        justify-content: center;
        padding: 8px 5px;
        font-size: 12px;
    }

    .datepicker-input {
        flex: 0 0 calc(35% - 8px);
        padding: 10px;
        font-size: 14px;
    }

    .time-range-container {
        flex-direction: row;
    }

    .time-input-group {
        flex: 1;
    }

    .time-input {
        padding: 10px;
        font-size: 14px;
        height: 42px;
    }
}

.modern-menu {
    background: white;
    border-radius: 18px;
    padding: 25px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
    border: 1px solid #f0f0f0;
}

.modern-menu-header {
    margin-bottom: 20px;
}

.menu-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.menu-divider {
    height: 2px;
    background: linear-gradient(90deg, #3498db, transparent);
    border-radius: 2px;
}

.modern-menu-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.modern-menu-item {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    background: #f8fafc;
    border-radius: 14px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.modern-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: #3498db;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    border-radius: 4px 0 0 4px;
}

.modern-menu-item:hover {
    background: white;
    border-color: #e3e8f0;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(52, 152, 219, 0.15);
}

.modern-menu-item:hover::before {
    transform: scaleY(1);
}

.modern-menu-item:hover .modern-menu-arrow {
    opacity: 1;
    transform: translateX(0);
}

.modern-menu-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    color: white;
    font-size: 20px;
    transition: all 0.3s ease;
}

.modern-menu-item:hover .modern-menu-icon {
    transform: rotate(10deg) scale(1.05);
}

.modern-menu-text {
    font-weight: 600;
    font-size: 16px;
    flex-grow: 1;
}

.modern-menu-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: #3498db;
    font-weight: bold;
}

/* Style pour les écrans mobiles */
@media (max-width: 768px) {
    .modern-menu {
        padding: 20px;
        border-radius: 16px;
    }

    .modern-menu-item {
        padding: 16px;
    }

    .modern-menu-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
        margin-right: 14px;
    }

    .modern-menu-text {
        font-size: 15px;
    }
}

/* Choices.js customization - Consistent with manage_entries.css */
.select-container {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    width: 100%;
    background-color: #ff0404;
    border-radius: 12px;
    padding: 2px;
    margin-bottom: 15px;
}

.select-container .choices {
    width: 100% !important;
}

.choices {
    width: 100% !important;
}

/* Placeholder inside the input */
.choices__item--disabled {
    color: #8b0000 !important; /* darker red */
    background-color: #ffe6e6 !important; /* pale red background */
    font-style: italic;
    font-weight: bold;
}

/* Placeholder in the dropdown list */
.choices__list--dropdown .choices__item--disabled {
    color: #8b0000 !important;
    background-color: #ffe6e6 !important;
    font-style: italic;
    font-weight: bold;
}

.choices__inner {
    min-height: 48px !important;
    padding: 7px 16px !important;
    font-size: 16px !important;
    border-radius: 10px !important;
    border: 2px solid var(--border-color) !important;
    display: flex !important;
    align-items: center;
    background: white !important;
}

.choices__list--single {
    display: flex !important;
    align-items: center;
}

.choices__list--single .choices__item {
    color: black !important;
    font-weight: 600;
}

.choices[data-type*="select-one"]:after {
    right: 16px;
    border-color: var(--text-color) transparent transparent;
}

.choices__list--dropdown {
    border-radius: 12px !important;
    border: 2px solid #3498db !important;
    margin-top: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.choices__list--dropdown .choices__item--selectable {
    padding: 12px 16px !important;
    font-size: 16px;
    color: black;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #3498db !important;
    color: white !important;
}

.choices__list--dropdown .choices__item--selectable:hover {
    background-color: #3498db !important;
    color: white !important;
}

.choices__placeholder {
    color: #666 !important;
    opacity: 1 !important;
}

.choices.is-open .choices__inner {
    border-radius: 10px 10px 0 0 !important;
    border-color: #3498db !important;
}

/* Adjust the client select container for index page */
.client-select-container {
    margin-top: 15px;
}

/* Responsive adjustments for Choices */
@media (max-width: 768px) {
    .select-container {
        min-width: 100%;
        max-width: 100%;
    }

    .choices__inner {
        min-height: 44px !important;
        padding: 5px 14px !important;
    }
}

/* Input group adjustments */
.input-daterange {
    display: flex;
    align-items: center;
    gap: 5px;
    flex-wrap: wrap;
}

.input-group-text {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0 10px;
    background-color: #f8f9fa;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-weight: 500;
}

.datepicker-input {
    height: 38px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
}

.time-input-fields {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.time-input-group {
    display: flex;
    flex-direction: column;
}

.time-input {
    height: 38px;
    padding: 8px 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    width: 100px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .input-daterange {
        flex-direction: column;
        align-items: flex-start;
    }

    .input-daterange .input-group-text {
        height: auto;
        padding: 5px 0;
        background-color: transparent;
        border: none;
    }
}


/* Nouveau style input-group */
.input-group {
    display: flex;
    align-items: stretch;
    border: 1px solid #d0d7de;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}
.input-group-text {
    background: #f6f8fa;
    padding: 8px 12px;
    font-weight: bold;
    color: #344054;
    border-right: 1px solid #d0d7de;
    display: flex;
    align-items: center;
    font-size: 14px;
}
.input-group input {
    border: none;
    outline: none;
    padding: 8px 10px;
    font-size: 14px;
    flex: 1;
}
.input-group input:focus {
    outline: none;
}

.date-range-container,
.time-range-container {
    display: flex;
    gap: 12px;
}
.time-input-group {
    display: flex;
    align-items: center;
}

.calculation-results {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}

.calculation-container {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.calculation-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.duration-info {
    font-weight: 600;
    color: #2c3e50;
}

.night-duration-info {
    font-weight: 600;
    color: #3498db;
}

.amount-info {
    font-weight: 600;
    color: #27ae60;
    margin-top: 10px;
}

.night-amount-info {
    font-weight: 600;
    color: #e67e22;
    margin-top: 5px;
}

.message {
    margin-top: 12px;
    padding: 8px 10px;
    border-radius: 6px;
}

.message.error {
    background: #ffdddd;
    color: #8b0000;
}

.message.success {
    background: #ddffea;
    color: #006400;
}