/* Main Application Styles */
body {
    font-family: Arial, sans-serif;
    margin: 20px;
    background-color: #f5f5f5;
}

.back-applications-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border: 1px solid #1f2937;
    border-radius: 6px;
    background: #1f2937;
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(31, 41, 55, 0.14);
    transition: background-color 0.2s, border-color 0.2s, transform 0.2s;
}

.back-applications-link:hover {
    background: #111827;
    border-color: #111827;
    transform: translateY(-1px);
}

.title {
    color: #333;
    margin-bottom: 20px;
}

/* Form Styles */
select, input[type="file"], input[type="submit"], input[type="number"], button {
    padding: 8px 12px;
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

button {
    background-color: #4CAF50;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #45a049;
}

.button_plus, .button_moins {
    background-color: #2196F3;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-right: 10px;
}

.button_plus:hover, .button_moins:hover {
    background-color: #1976D2;
}

/* Table Styles */
table {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
    background-color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#myTable {
    border: 1px solid #ddd;
}

#myTable th, #myTable td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: left;
}

#myTable th {
    background-color: #f2f2f2;
    font-weight: bold;
    cursor: pointer;
    position: relative;
    user-select: none;
}

#myTable th:hover {
    background-color: #e8e8e8;
}

#myTable th.sortable {
    cursor: pointer;
}

#myTable th i {
    margin-left: 5px;
    opacity: 0.5;
}

#myTable tr:nth-child(even) {
    background-color: #f9f9f9;
}

#myTable tr:hover {
    background-color: #f5f5f5;
}

/* Editable cells */
td[contenteditable="true"] {
    cursor: text;
}

td[contenteditable="true"]:focus {
    background-color: #fff3cd;
    outline: 2px solid #ffc107;
}

/* Form container */
form {
    background-color: white;
    padding: 20px;
    margin: 20px 0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Message and result display */
#message, #result {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-weight: bold;
}

#message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

#result {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Controls container */
.controls {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

/* Responsive design */
@media (max-width: 768px) {
    body {
        margin: 10px;
    }
    
    .controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    select, input, button {
        width: 100%;
        box-sizing: border-box;
    }
    
    table {
        font-size: 12px;
    }
    
    #myTable th, #myTable td {
        padding: 8px;
    }
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error states */
.success {
    background-color: #d4edda !important;
    color: #155724 !important;
}

.error {
    background-color: #f8d7da !important;
    color: #721c24 !important;
}
