* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #c0c0c0;
    color: #000;
    font-size: 11px;
    overflow: hidden;
}

.window {
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.window-title {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-control {
    width: 16px;
    height: 14px;
    border: 1px outset #c0c0c0;
    background-color: #c0c0c0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
}

.window-control:hover {
    background-color: #d4d0c8;
}

.window-content {
    flex: 1;
    padding: 8px;
    overflow: auto;
    background-color: #c0c0c0;
}

.main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    height: 100%;
}

.list-section {
    height: 200px;
}

.search-bar {
    margin-bottom: 4px;
}

.form-section-main {
    flex: 1;
    overflow: auto;
}

.button {
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 4px 12px;
    font-size: 11px;
    cursor: pointer;
    font-family: 'MS Sans Serif', sans-serif;
    min-width: 80px;
    height: 23px;
}

.button:hover {
    background-color: #d4d0c8;
}

.button:active {
    border: 2px inset #c0c0c0;
}

.button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button-danger {
    background-color: #ff0000;
    color: white;
    border: 2px outset #ff0000;
}

.button-danger:hover {
    background-color: #ff3333;
}

.input {
    background-color: white;
    border: 2px inset #c0c0c0;
    padding: 2px 4px;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    width: 100%;
}

.input:focus {
    outline: 1px dotted #000;
    outline-offset: -2px;
}

.label {
    font-size: 11px;
    margin-bottom: 2px;
    display: block;
}

.list-grid {
    background-color: white;
    border: 2px inset #c0c0c0;
    overflow-y: auto;
    height: 150px;
}

.list-row {
    padding: 2px 4px;
    cursor: pointer;
    border-bottom: 1px solid #d4d0c8;
    display: grid;
    grid-template-columns: 80px 1fr 1fr 1fr;
    gap: 8px;
}

.list-row:hover {
    background-color: #e8e8e8;
}

.list-row.selected {
    background-color: #316ac5;
    color: white;
}

.form-section {
    background-color: #c0c0c0;
    border: 2px inset #c0c0c0;
    padding: 8px;
    margin-bottom: 8px;
}

.form-section-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 11px;
}

.form-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px;
    margin-bottom: 4px;
    align-items: center;
}

.form-row label {
    font-size: 11px;
}

.textarea {
    background-color: white;
    border: 2px inset #c0c0c0;
    padding: 4px;
    font-size: 11px;
    font-family: 'MS Sans Serif', sans-serif;
    resize: vertical;
    min-height: 80px;
    width: 100%;
}

.button-bar {
    display: flex;
    gap: 8px;
    padding: 8px;
    background-color: #c0c0c0;
    border-top: 2px inset #c0c0c0;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background-color: #c0c0c0;
    border: 2px outset #c0c0c0;
    padding: 16px;
    min-width: 300px;
    max-width: 600px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
}

.modal-title {
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    padding: 4px 8px;
    font-weight: bold;
    margin: -16px -16px 16px -16px;
    font-size: 11px;
}

.modal-content {
    margin-top: 16px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.sort-info {
    margin-top: 4px;
    font-size: 10px;
    color: #666;
}

.link {
    color: #0000ff;
    cursor: pointer;
    text-decoration: underline;
}

.link:hover {
    color: #0000cc;
}

.radio-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-label input {
    margin-right: 8px;
}

::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px inset #c0c0c0;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 1px outset #c0c0c0;
}

::-webkit-scrollbar-thumb:hover {
    background: #d4d0c8;
}

