html, body {
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* list panel */
.combo-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 18px 15px;
    margin-bottom: 10px;
    background-color: rgb(123, 162, 197);
}
    .combo-row label {
        flex-shrink: 0;
        color: white;
        font-weight: bold;
    }

    .combo-row select {
        height: 25px;
        background: white;
        width: 240px;
        box-sizing: border-box;
        border: 1px solid #999;
        padding: 2px 6px;
    }
        .combo-row select:disabled {
            color: #000;
            opacity: 1;
            -webkit-text-fill-color: #000;
        }

.search-row {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 7px;
}

.search-box {
    width: 240px;
    height: 23px;
    box-sizing: border-box;
    border: 1px solid #999;
    padding: 4px 6px;
}
    .search-box:focus {
        border-color: #86b7fe;
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

.search-icon {
    font-size: 14px;
}

.list-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    background-color: #f6f7fa;
}
    .list-table thead th {
        border: 1px solid #999;
    }
    .list-table th {
        text-align: left;
        padding: 5px 25px 5px 6px;
        font-weight: 600;
        position: relative;
        cursor: pointer;
        user-select: none;
    }

.sort-arrow {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #555;
}

    .list-table td {
        padding: 5px 6px;
    }

    /* datagridview */
    .list-table tbody tr {
        cursor: pointer;
    }

        .list-table tbody tr:hover {
            background-color: #e8eef5;
        }

        .list-table tbody tr.selected-row {
            background-color: #b8d7f0;
        }
        .list-table tbody tr.disabled-row {
            cursor: not-allowed;
            pointer-events: none;
        }

/* detail panel */
.dual-col {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.detail-form {
    display: grid;
    grid-template-columns: 120px 350px;
    column-gap: 15px;
    row-gap: 7px;
    align-items: center;
    max-width: 500px;
}

    /* Common input styles */
    .detail-form input[type="text"],
    .detail-form input[type="date"],
    .detail-form textarea,
    .detail-form select {
        width: 100%;
        box-sizing: border-box;
        border: 1px solid #999;
        padding: 2px 6px;
        background-color: #fff;
    }

    /* Input and select height */
    .detail-form input[type="text"],
    .detail-form input[type="date"],
    .detail-form select {
        height: 23px;
    }

    /* Textarea */
    .detail-form textarea {
        height: 77px;
        resize: none;
    }

        /* Focus when editable */
        .detail-form input[type="text"]:not([readonly]):focus,
        .detail-form input[type="date"]:not([readonly]):focus,
        .detail-form select:not([readonly]):not(:disabled):focus,
        .detail-form textarea:not([readonly]):focus {
            border-color: #86b7fe;
            outline: none;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
        }

        /* Focus when readonly */
        .detail-form input[type="text"][readonly]:focus,
        .detail-form input[type="date"][readonly]:focus,
        .detail-form select[readonly]:focus,
        .detail-form textarea[readonly]:focus {
            border: 1px solid #999;
            outline: none;
            box-shadow: none;
        }

    /* Disabled select */
    .detail-form select:disabled {
        background-color: #fff;
        color: #000;
        opacity: 1;
        -webkit-text-fill-color: #000;
    }

/* Checkbox */
.form-option {
    grid-column: 2 / 3;
    display: flex;
    align-items: center;
    gap: 7px;
}

    .form-option input[type="checkbox"] {
        width: auto;
        height: auto;
        margin: 0;
    }

.last-edited {
    grid-column: 2 / 3;
    display: flex;
    margin-top: 5px;
    color: rgb(49, 86, 122);
    font-size: 12px;
    white-space: nowrap;
}

/* Record Navigation */
.record-nav {
    width: 350px;
    grid-column: 2 / 3;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .record-nav button {
        width: 36px;
        height: 20px;
        border: 1px solid #999;
        border-radius: 3px;
    }
        .record-nav button img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        .record-nav button:hover {
            border-color: #86b7fe;
            outline: none;
            box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
        }

    .record-nav span {
        flex: 1;
        text-align: center;
        height: 20px;
        color: rgb(49, 86, 122);
        background-color: rgb(250,250,250);
    }

/* CRUD Buttons */
.button-add {
    grid-column: 2 / 3;
    display: flex;
    gap: 15px;
}

.button-row {
    margin-top: 5px;
    margin-bottom: 10px;
    display: flex;
    gap: 9px;
}
    .button-row button {
        height: 40px;
        border: none;
    }
    .button-row button:hover {
        border-color: #86b7fe;
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

.btn-exit {
    width: 50px;
    background-color: rgb(123, 162, 197);
    margin-left: -59px;
    padding-top: 2px;
}

.btn-print {
    width: 50px;
    background-color: rgb(123, 162, 197);
    padding-top: 4px;
}

.btn-action {
    width: 95px;
    background-color: rgb(37, 133, 205);
    color: white;
}

.btn-delete {
    width: 95px;
    background-color: rgb(255, 128, 128);
    color: white;
}

.warning {
    grid-column: 2 / 3;
    color: #c00000;
    margin-bottom: 8px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}
    .warning img {
        width: 20px;
        height: 20px;
        object-fit: contain;
    }

/* for single button */
.btn-single {
    border: none;
    height: 23px;
    width: 32px;
    margin: 0;
    padding: 0 0 3px 0;
    background-color: rgb(37, 133, 205);
    color: white;
}

    .btn-single:hover {
        border-color: #86b7fe;
        outline: none;
        box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    }

.input-info {
    height: 23px;
    box-sizing: border-box;
    border: 1px solid #999;
    padding: 2px 6px;
    background-color: #f2f2f5;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
    text-align: right;
}
