* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f3f5f7;
    color: #222;
}

header {
    background: #222;
    color: white;
    padding: 20px 30px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.subtitle {
    color: #bbb;
    font-size: 13px;
}

main {
    max-width: 1500px;
    margin: 25px auto;
    padding: 0 20px;
}

.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;

    padding: 22px;
    margin-bottom: 20px;

    box-shadow: 0 2px 4px rgba(0,0,0,.05);
}

.card h2 {
    margin-top: 0;
    font-size: 20px;
}

.card h3 {
    margin-top: 25px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;

    margin-bottom: 15px;
}

.field {
    display: flex;
    flex-direction: column;
    min-width: 180px;
}

.field-large {
    min-width: 300px;
}

.field label {
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 6px;
}

input,
select {
    padding: 8px 10px;
    border: 1px solid #bbb;
    border-radius: 4px;
    font-size: 14px;
}

input:focus,
select:focus {
    outline: none;
    border-color: #555;
}

.checkbox-field {
    justify-content: center;
}

.checkbox-field label {
    font-weight: normal;
}

.checkbox-field input {
    margin-right: 6px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th {
    background: #eceff1;
    text-align: left;
    font-size: 13px;
}

th,
td {
    border: 1px solid #ddd;
    padding: 9px;
}

tbody tr:hover {
    background: #fafafa;
}

tbody tr.selected {
    background: #eef5ff;
}

.time {
    width: 75px;
    text-align: center;
}

.actions {
    white-space: nowrap;
    text-align: right;
}

.btn {
    display: inline-block;

    padding: 8px 13px;

    border: none;
    border-radius: 4px;

    cursor: pointer;

    text-decoration: none;
    font-size: 13px;
}

.btn-primary {
    background: #2962ff;
    color: white;
}

.btn-success {
    background: #168544;
    color: white;
}

.btn-danger {
    background: #c62828;
    color: white;
}

.btn-secondary {
    background: #666;
    color: white;
}

.btn-small {
    padding: 6px 9px;
    font-size: 12px;
}

.btn:hover {
    opacity: .88;
}

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

.hidden {
    display: none !important;
}


/*
 * Messages
 */

.message {
    padding: 12px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.message.success {
    background: #e8f5e9;
    border: 1px solid #81c784;
    color: #1b5e20;
}

.message.error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}


/*
 * Modales
 */

.modal {
    position: fixed;

    top: 0;
    left: 0;

    width: 100%;
    height: 100%;

    background: rgba(0,0,0,.55);

    display: flex;
    justify-content: center;
    align-items: center;

    z-index: 1000;
}

.modal-content {
    width: 450px;
    max-width: 95%;

    background: white;

    border-radius: 6px;

    padding: 25px;

    box-shadow: 0 5px 25px rgba(0,0,0,.3);
}

.modal-large {
    width: 600px;
}

.modal-content .field {
    margin-bottom: 15px;
}

.modal-buttons {
    margin-top: 20px;

    display: flex;
    justify-content: flex-end;

    gap: 10px;
}

.table-wrapper {
    overflow-x: auto;
}


@media (max-width: 800px) {

    header {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
        align-items: stretch;
    }

    .field,
    .field-large {
        width: 100%;
        min-width: 0;
    }
}
